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.

Prepare for React futures

See original GitHub issue

I’m so happy to see how Slate has continued to grow and is so well maintained. 👍 I’ve finally had an opportunity to use it again, and I reached for it without hesitation.

One thing I have noticed is that warnings get thrown out when running Slate with React’s StrictMode enabled.

It would be great to compile a list of the things that need to be updated/refactored in order to get Slate lined up for the future of React.

Currently I see the following:

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Editor$$1 which is inside StrictMode. Instead, add a ref directly to the element you want to reference.

    in div (created by Content)
    in Content (created by Editor$$1)

The fix for this is detailed here.

Here is a demo showcasing Slate, whilst making use of the new Concurrent and Hooks features of React: https://codesandbox.io/s/qvoxpl3x4j

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tobiasandersencommented, Apr 30, 2019

FWIW I think the plan is to make forwardRef the default behavior in future versions of React (see https://twitter.com/dan_abramov/status/1109512531209584640)

1reaction
YurkaninRyancommented, Nov 15, 2018

Would the solution to this be to keep a ref map for all of the nodes in the editor? 😬

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preparing for the Future with React Prereleases
To share upcoming changes with our partners in the React ecosystem, we're establishing official prerelease channels.
Read more >
Top 50 React Interview Questions and Answers in 2023
Top 50 React Interview Questions You Must Prepare In 2023 ... Contains the knowledge of past, current and possible future changes in state ......
Read more >
React Interview Preparation Guide | React Learning Path 2022
In this video I am going to discuss how to prepare for interviews if you are looking for UI development or React developer...
Read more >
Cheat Sheet for React Interview Questions 2020 | by Steven Jin
This page aims to aggregate multiple basic React interview questions in a succinct and unopinionated manner.
Read more >
How to build React portfolio projects that get you a job + 3 ...
But if your goal is to prepare yourself and your portfolio for the job ... The idea sounds convincing: your future employer will...
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