Skip to content

A couple of minor React tweaks#79

Open
alismith-dev wants to merge 2 commits into
reactfrom
react-tweaks
Open

A couple of minor React tweaks#79
alismith-dev wants to merge 2 commits into
reactfrom
react-tweaks

Conversation

@alismith-dev

Copy link
Copy Markdown
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.

@alismith-dev alismith-dev requested a review from a team May 3, 2022 16:30

@Dedekind561 Dedekind561 left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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