Skip to content
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

A couple of minor React tweaks #79

Open
wants to merge 2 commits into
base: react
Choose a base branch
from
Open

A couple of minor React tweaks #79

wants to merge 2 commits into from

Conversation

40thieves
Copy link
Collaborator

Two small tweaks to the react branch:

  1. Extract the useExercise hook to it's own file
  2. Fix invalid class prop

Both of these have come up on other branches I've been working on, and I figured I should just get them merged.

@40thieves 40thieves requested a review from a team May 3, 2022 16:30
Copy link
Collaborator

@Dedekind561 Dedekind561 left a comment

Choose a reason for hiding this comment

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

Mostly looks good - just one minor question

const [exerciseIndex, setExerciseIndex] = useState(0);

function nextExercise() {
setExerciseIndex(exerciseIndex + 1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you need to use an update callback here?

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