Skip to content

Example using freactal for state management in Nextjs

Notifications You must be signed in to change notification settings

avanslaars/freactal-next

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nextjs and Freactal Example

This example demonstrates the use of freactal with Nextjs.

The example is just a counter that maintains state between pages.

Each page is wrapped with state for globally accessible state values. For local needs, state can be composed and the state needed at lower levels can be specified in their own store and composed. If you look at the LocalCounter component, you'll see that it has its own state, but also has access to the global state through its parent. The local state can be updated, but leaving the page and coming back reinitializes the local state, which leaving the global state untouched, just like we want.

About

Example using freactal for state management in Nextjs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published