https://github.com/midnighter/useobserver-demo
A tiny demonstration of the useObserver mobx-react-lite hook in combination with mobx-state-tree.
https://github.com/midnighter/useobserver-demo
mobx mobx-react-lite mobx-state-tree props react-hooks reactjs typescript
Last synced: about 2 months ago
JSON representation
A tiny demonstration of the useObserver mobx-react-lite hook in combination with mobx-state-tree.
- Host: GitHub
- URL: https://github.com/midnighter/useobserver-demo
- Owner: Midnighter
- License: apache-2.0
- Created: 2020-03-09T22:58:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-09T22:59:19.000Z (about 6 years ago)
- Last Synced: 2025-01-04T20:15:01.885Z (over 1 year ago)
- Topics: mobx, mobx-react-lite, mobx-state-tree, props, react-hooks, reactjs, typescript
- Language: TypeScript
- Size: 179 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `userObserver` Demo
A tiny project that demonstrates how to use
[mobx-state-tree](https://mobx-state-tree.js.org/) (MST) as a global store,
pass parts of the store to child components via props, and make them
observable using the `useObserver` hook from
[mobx-react-lite](https://mobx-react.js.org/).
- All code related to the MST store can be found in [`src/store.tsx`](src/store.tsx).
- The entire app is contained in [`src/App.tsx`](src/App.tsx).
## Copyright
- Copyright © 2020, Moritz E. Beber.
- Free software distributed under the [Apache Software License
2.0](https://www.apache.org/licenses/LICENSE-2.0).