How azisbek/todo-react_locallstorage works
This is a small React post-board app: the browser mounts the app, users can open a form and submit a post, and the resulting post appears in the list. App owns the post state and loads/saves it through browser localStorage; Main coordinates the form and list. The sampled source supports these component and storage links. The README describes only Create React App setup, not additional product capabilities.
Main entry points: Main.jsx Post coordinator · App.js App state · Form.jsx Post form · Header.jsx Header
Components 7
Post interface
- Header
src/components/Header/Header.jsx - Post coordinator
src/components/Main/Main.jsx - Post form
src/components/Main/Form.jsx - Post list
src/components/Main/Post.jsx
Post state
- App state
src/App.js - Local storage
Other components
- Browser
Connections 8
- Browser → App state: mounts
- App state → Header: renders
src/App.js - App state → Post coordinator: renders
src/App.js - App state → Local storage: loads and saves
src/App.js - Post coordinator → Post form: renders
src/components/Main/Main.jsx - Post coordinator → Post list: renders
src/components/Main/Main.jsx - Post form → Post coordinator: submits post
src/components/Main/Form.jsx - Post coordinator → App state: calls addPost
src/components/Main/Main.jsx