Skip to content

Conversation

cmhorsey
Copy link

Practiced working with useEffect and an API to fetch data, implement event handlers, and update state based on API data.

Copy link

@stephenmckeon stephenmckeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!


return (
<main>
<AdminNavBar onChangePage={setPage} />
{page === "Form" ? <QuestionForm /> : <QuestionList />}
{page === "Form" ? <QuestionForm questions={questions} setQuestions={setQuestions}/> : <QuestionList questions={questions} setQuestions={setQuestions} />}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be best broken up into multiple lines.

const { id, prompt, answers, correctIndex } = question;


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants