3 ms·
Well there are people doing some of these things in React and fighting React just so they "did it in react." For instance there is some blog out there which is
by 0xCMP 11y ago
Well there are people doing some of these things in React and fighting React just so they "did it in react." For instance there is some blog out there which is "the more complicated blog ever" and it's an isomorphic react application. Then there are the people who use React and the 'renderToStaticString'(or something) to make static sites using React.
- straws 11y agoI'm not sure I'd agree that those are examples of people fighting React though — using it on the client and server allows you to never duplicate markup you might have in a component with markup in a template, for example. The case for writing your entire UI in React is pretty strong actually, as it's just a matter of where you create the data to pass down to your tree of components: once, on the server for a complete page load, or incrementally and dynamically on the client. There are some cases though where the component model feels strained — consider components that act as a pass-through for debouncing data, components that implement routing as a tree of routes and handlers, or components that perform data-fetching. Perhaps it's that the community hasn't found the right APIs for these higher-order components, but it's hard to argue against using React for a stateless tree of UI components.