Bug: Cannot update slate state externally
See original GitHub issueDescription
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:
- Created 2 years ago
- Reactions:35
- Comments:26 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
todefaultValue
orinitialValue
) as thevalue
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).
Ouch, we got bitten hard by this. Downgraded for now.