jodit / jodit/jodit-react

onBlur and onChange have stale reference

Open Beginner friendly
#101 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
406
Forks
131
Avg merge
2h 32m
Merged PRs (30d)
2

Description

onBlur and onChange should be wrapped in their own useEffect to avoid outdated reference and closure for these methods. They should be handled separately, like value is.

https://github.com/jodit/jodit-react/blob/master/src/JoditEditor.js#L30-L50

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/JoditEditor.js around lines 30-50, the entry point named by the issue. Compare how value is handled and trace the current onBlur and onChange references. Done means each callback is handled in its own useEffect so outdated references and closures are avoided.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.