plotly / plotly/dash

clientside callbacks mutate arguments in place - but the docs don't mention this

Open
#1,819 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dash-callbacks
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

Open the contributing guide

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.