Echo JS 0.11.0

<~>
tracker1 3030 days ago. link 0 point
While an interesting demo, the ClosureScript is difficult for me to read.  Also, this can be done pretty easily with React+Redux as well, only populating the primary data on the server, to a full render/rerender on the server via redux-universal as well as other options for partial rendering, or donut caching.

In particular donut caching can work very well with react, having the surrounding render server-cached and templated, only injecting the server-populated center piece (which works for the unauthenticated user case, being SSO friendly), and having the client load any authenticated pieces in the surrounding areas.  Instead of mounting a single react app, you can mount 3-4 one for each region connected to the same store.

Replies

jiyinyiyong 3029 days ago. link 2 points
I believe JavaScript is a bad language so I switched to ClojureScript half a year ago.

I doubt that React can do that now. Maybe, but not perfect. Like you said, multiple root components. But if the app is complicated, you may want to route pages with React. Then it's  not enough.
tracker1 3029 days ago. link 2 points
I happen to like JS, more so with the extra ES6+ niceties, but I can see the appeal of a more purely functional language without some of the extras.

And no, imho no solution is perfect.. tbh, if it's public facing I'd just prepopulate the store server-side with the essential portion of data and let the rest populate client-side... that would take care of the non logged in user case, and account for search engines... the rest can run client side.  In the end, it's up to the author.

I also happen to really like react in general, and if full server rendering were desired, I'd go the redux-universal route.  I usually use the thunk methods with async functions anyhow, so that allows promise resolution to work in that way.

To each their own though.
jiyinyiyong 3029 days ago. link 0 point
yeah, React is cool and I used it for two years and I'm still using it. I just think it's always limited because of JavaScript and Facebook. While is ClojureScript we can try more.