-
Notifications
You must be signed in to change notification settings - Fork 205
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
Fix react-tutorial: typo, navbar reference and improve error handlig #1495
Conversation
…dling - Add error handling to Ideas context - Add database creation instructions - Fix form submission clearing
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.
All of our tutorials should be the same so these changes will need to be replicated to the other tutorials as well
@@ -56,30 +64,43 @@ export function useIdeas() { | |||
|
|||
export function IdeasProvider(props) { | |||
const [ideas, setIdeas] = useState([]); | |||
const [error, setError] = useState(null); |
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.
This error
doesn't look like it's used anywhere 🧐
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.
I added it in case the user wanted to do something with the state (was setting the state in the catch block) but I've removed it now
3. Give it a name (e.g. "ideas-tracker") | ||
4. Save the database ID as you'll need it later |
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.
The collection screenshot has "Ideas Tracker" for the name and "ideas-tracker" for the ID so let's use something similar for the database ID and name.
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.
Got it. I've clarified the instruction
Co-authored-by: Steven Nguyen <[email protected]>
What does this PR do?
Updates doc React tutorial
Test Plan
/docs/tutorials/react/step-7