-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add react example #1
base: main
Are you sure you want to change the base?
Conversation
@@ -5,7 +5,7 @@ | |||
"scripts": { | |||
"manifest": "node node_modules/manifest/scripts/watch/watch.js", | |||
"manifest:seed": "node node_modules/manifest/dist/manifest/src/seed/scripts/seed.js", | |||
"dev": "concurrently \"npm run manifest\" \"cd examples/angular && npm run dev\"" | |||
"dev": "concurrently \"npm run manifest\" \"cd examples/react_ex && npm run dev\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe there's some way to choose which example to run instead of manually changing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can probably use useState
instead since the tasks aren't that complex...using a reducer seems excessive for this specific use case
import { Item } from "./item"; | ||
import classnames from "classnames"; | ||
|
||
export function Main({ todos, toggleAll, toggleItem, removeItem, updateItem }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prop drilling! we're only passing toggleItem
, removeItem
and updateItem
so we can pass it on to our Item
component. This can be fixed if we use a ContextProvider I believe
The playbackRate error shows even without connecting to the manifest backend so my guess is that it exists in the original todo-mvc repo: Error_Persists_Even_Without_Manifest.mp4Also, is there a way to ensure the backend has started first before the frontend starts. When |
Works toward mnfst/manifest#206
Demo:
Demo_Todo_React.mp4
Tagging @brunobuddy