react-async
flux-examples
react-async | flux-examples | |
---|---|---|
1 | 1 | |
445 | 1,081 | |
- | - | |
0.0 | 10.0 | |
over 7 years ago | over 8 years ago | |
JavaScript | ||
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
react-async
-
Strategies for server-side rendering of asynchronously initialized React.js components
React-async. This approach is perfect. It lets me simply define in a special function in each component how to initialize the state (doesn't matter whether synchronously or asynchronously) and these functions are called as the hierarchy is being rendered to HTML. It works in a way that a component is not rendered until the state is completely initialized. The problem is that it requires Fibers which is, as far as I understand, a Node.js extension that alters the standard JavaScript behavior. Although I really like the result, it still seems to me that instead of finding a solution we changed the rules of the game. And I think we shouldn't be forced to do that to use this core feature of React.js. I'm also not sure about the general support of this solution. Is it possible to use Fiber on standard Node.js web hosting?
flux-examples
-
Strategies for server-side rendering of asynchronously initialized React.js components
In my opinion, the simplest way is to populate all my stores before the actual rendering begins. That means somewhere outside of the component hierarchy (hooked to my router for example). The problem with this approach is that I would have to pretty much define the page structure twice. Consider a more complex page, for example a blog page with many different components (actual blog post, comments, related posts, newest posts, twitter stream...). I would have to design the page structure using React components and then somewhere else I would have to define the process of populating each required store for this current page. That doesn't seem like a nice solution to me. Unfortunately most isomorphic tutorials are designed this way (for example this great flux-tutorial).
What are some alternatives?
react-refetch - A simple, declarative, and composable way to fetch data for React components
node-fibers - Fiber/coroutine support for v8 and node.
redux-async-connect - It allows you to request async data, store them in redux state and connect them to your react component.
React - The library for web and native user interfaces.
async-props - Co-located data loading for React Router
redux-connect - Provides decorator for resolving async props in react-router, extremely useful for handling server-side rendering in React
react-resolver - Async rendering & data-fetching for universal React applications.
react-router-relay - [Deprecated] Relay Classic integration for React Router
redial - Universal data fetching and route lifecycle management for React etc.
axios-react - 🌐 HTTP client component for React based on Axios