onBlur and onChange have stale reference
Open
Beginner friendly
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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