Live data from Hacker News

None of my projects want to be SPAs

whatisjasongoldstein.com

361–362 of 362 posts

Re: None of my projects want to be SPAs

#361
post #93

What I did for a mobile web app I built last year after the react prototype was to slow on old devices: - Render all pages/routes/states into a single html file (size ~2mb) but each page/component/state hidden via style=display:none;. - then write some hand crafted js (few hundred lines) to add event listeners to forms and show/hide the components depending on url change - cache everything via appcache/serviceworker…

This is the worst approach I've ever read about.

why? It solved all the probles the previous implementations had and was even easier to implement.

Re: None of my projects want to be SPAs

#362
post #280

Earlier quoted context omitted.

I read the thread. You hand-waved away a non-trivial problem by "explaining" properties are a thing. Thanks, bud. I'm sorry I didn't cite your favorite source to your satisfaction, but I quoted the relevant parts of the post I replied to. > Futher, Redux doesn't solve synchronization issues in situations where you can't represent the data the same way. It's kind of the whole Redux philosophy that you won't do that. I…

But, in a project of any significant complexity, you will represent the data in different formats, because transforming data into different formats is one of the main functions of software. Relying on a framework that assumes you won't do something that you will do is a Very Bad Idea.

It's almost like `mapStateToProps` is a thing and Dan Abramov has built a web app before. You have to store and transform your data in a normalized form, but you can consume it however you want.

Restrictions are the price of solving hard problems (even if you don't want to admit they're hard) in a deterministic fashion.

Post reply on HN