question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: Cannot update slate state externally

See original GitHub issue

Description

The PR https://github.com/ianstormtaylor/slate/pull/4540 removed the ability to update the slate state using the value prop. As a result, we cannot inject externally changed state anymore.

If there is another way to update the state externally, then the documentation should be updated as well. https://docs.slatejs.org/walkthroughs/06-saving-to-a-database

Environment

  • Slate Version: “^0.67.0”
  • Operating System: Windows
  • Browser: Firefox

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:35
  • Comments:26 (4 by maintainers)

github_iconTop GitHub Comments

22reactions
jan-martinekcommented, Nov 10, 2021

It took me several days to find out that changes in #3216 were silently reversed in #4540. It would be great to reflect the changes not only in docs as others say above, but also in API (eg revert value to defaultValue or initialValue) as the value prop implies controlled behavior.

It‘s possible that out there are many others struggling to find out what went wrong (in our case it wasn’t an upgrade going bad — that would make me go for changelists sooner, but documentation being out of date and API pretending that everything is okay).

11reactions
circlingthesuncommented, Oct 20, 2021

Ouch, we got bitten hard by this. Downgraded for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Delayed setState(value) results in Cannot resolve a DOM ...
One "fix" for this bug is to move the selection state back into the value state. However, that's a non trivial change and...
Read more >
Warning: setState(...): Cannot update during an existing ...
It looks like the app gets in a loop: Warning: setState(...): Cannot update during an existing state transition (such as within ...
Read more >
OxygenOS 12 A.14 for OnePlus 10 Pro(NA/EU/GLO ADDED)
Hey everyone, after having the chance to talk to the OS team, I have confirmed that the update rolling out is indeed the...
Read more >
Dreaming, Philosophy of
There are various reasons to believe that creature consciousness and state consciousness can come apart (and that state consciousness can plausibly occur ...
Read more >
Creating An Outside Focus And Click Handler React ...
The Problem With DOM Hierarchy Based Outside Click Detection Logic. But there's one problem. Our React component doesn't work if any of its ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found