useContext or similar global shared state system
See original GitHub issuei’ve seen a few mention on it in the different Pr/issues but can’t find anything about it in the current fre
package.
Is it still something that is planned?
A Pr was also talking about a fre/compat
for context. Is this a future plan or already there(couldn’t find it)?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
useContext for better state management! - DEV Community
React context is nothing but a global state to the app. It is a way to make a particular data available to all...
Read more >How To Share State Across React Components with Context
In this tutorial, you'll share state across multiple components using React context. React context is an interface for sharing information ...
Read more >How to share state across React Components with context
In a small app, React Context along with useState is the best way to share state or simply pass data around components without...
Read more >Share Your Data With Context and useContext
React's documentation states that “Context is designed to share data that can be considered global,” for example, current authenticated user ...
Read more >Using React's Context API for Global State Management
To put it simply, global state is the data that is shared between all the components within a React application. When the state...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Because of the upgrade of new version fre2, this work was not performed, but this is what we will do in the future.
Shared state may be easy with hooks API, for example:
After fre2 is finally released, we can add some api and compat packages, it will be soon.
@mindplay-dk I don’t want to use
pub-sub
in the core code of fre (just like preact). If I have to, I prefer to setshoudComponentUpdate
for all components, and then usepub-sub
similar technologies