clientside callbacks mutate arguments in place - but the docs don't mention this
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
As mentioned in #1040 clientside callbacks differ from their python counterparts by not serializing and de-serializing props, which instead get mutated in place.
Given that this is not explained in the docs, the errors that result from mutating component props in place are extremely cryptic (e.g. unexpected firing of other callbacks, or components throwing all kinds of errors).
It would have saved me two days of debugging time if there had been a line or two about this to the docs, and I would suggest adding it ASAP to spare others the same!
Thanks!
Contributor guide
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 by locating the clientside callback documentation and reviewing issue #1040 for the referenced behavior. Add a brief explanation that clientside callback props are mutated in place rather than serialized and deserialized, including the risks of mutating them; done when the behavior and consequences are clear to users.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100