Global & Local State with MobX React Example #2749
codeBelt
started this conversation in
Show and tell
Replies: 1 comment 4 replies
-
Looks solid! Why don't you want to use |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Check out my MobX React example!
I will be writing an article on the follow code example, but I wanted to share to see if I get any feedback with improvements first.
Global & Local State with MobX React Example
A factory function approach to MobX stores with React & Next.js
View the demo site
Checkout the repo
Quick Overview
GlobalStores
observable
observable
Local Stores
observable
observable
makeAutoObservable
for comparisonIf you want to see an overview of the files using Mobx check out this PR Diff.
If you want to check out the example with stores using all ES6 Classes here is the branch. (PR Diff)
Feedback Welcomed
If you want to give me feedback on how to improve my usage with MobX, TypeScript types, or Next.js. Create an issue on my repo.
You could also fork my repo and create a PR to show me how you would improve something.
Help Wanted
runInAction
from ToastGlobalStore and validate I set up ToastNotifier correctly.Beta Was this translation helpful? Give feedback.
All reactions