Hacker News new | past | comments | ask | show | jobs | submit | Swennemans's comments login

It is indeed very close to how you would model redux apps. Interesting that you mention that your controllers don't have read access to store(s). That is actually very common with redux-thunk or redux-saga.


Redux does this.


Well that escalated quickly.


What about oCaml/Reason?

oCaml/Reason can compile to JavaScript making it posible to write everything in one very powerfull language. In the near future we can probably also use jsx.

Seems like an improvement over using node and React.


Same with F# and Fable.


Are there any numbers comparing pre-rendered React versus React communicating with a JSON Api? It seems to put a lot more stress on the server which can neglect the (theoritical) speed improvements


Not sure, but the time cost is the latency of loading an almost-empty index.html, loading and parsing your app, _then_ it starts running and hopefully fast doing some API requests and then it's off and good to go. Subsequent JSON-API-requests-and-then-rerenders should be pretty fast indeed, but those aren't the point :)

You want to server-side render React apps so that while all that happens, the app already works.


Curious, why would you combine this with Phoenix?


Because Phoenix has a WS abstraction (Channels) and supports it out of the box.


Yes but isn't one of Elixir's strenghts that it scales very well on a single machine? Why do we need the load balancing?


Every backend architecture should account for having multiple machines. What are you going to do once you get enough traffic that one machine can't handle it?


Care to eloborate?


That seems unnecessary. Or did you use (something like) Meteor.js?


But how do you decide to stop sprinkling your JavaScript and go full blow React (serious question)?


When "sprinkling Javascript" turns into "making sauce for the spaghetti you've been cooking", it's probably time to consider React or something similar.


In Amsterdam speaking English is well accepted.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: