Incompatibility with React.StrictMode
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, react
Research direction
Start with the linked CodeSandbox and reproduce the findDOMNode warning under React.StrictMode, including when MobxDevTools is outside the StrictMode tree. Inspect the devtools integration responsible for the warning. Done means removing the warning where possible, or documenting the limitation in the README.
Written by the indexing model from the issue text.
Description
Hello and thanks for mobx and the devtools! :)
I'm trying to use the devtools in an app while using React's (relatively) new StrictMode. But I'm getting this error:
Warning: findDOMNode is deprecated in StrictMode.
findDOMNode was passed an instance of _class which is inside StrictMode.
Instead, add a ref directly to the element you want to reference.
The interesting thing is that it happens even when the devtools aren't mounted to a StrictMode tree:
<>
<React.StrictMode>
<TodoList todoStore={store} />
</React.StrictMode>
<MobxDevTools />
</>
I'm also able to reproduce the same issue in my real app.
Can anything be done about it? If not, we should at least have a note in the README.
Here's a codesandbox where you can see the issue: https://codesandbox.io/s/1jjgxvjzo?autoresize=1&expanddevtools=1&fontsize=14
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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.
More from mobxjs/mobx-react-devtools
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
mobxjs/mobx-react-devtools#119 ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
mobxjs/mobx-react-devtools#118 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
mobxjs/mobx-react-devtools#117 · 3 comments · 13 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
mobxjs/mobx-react-devtools#115 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
mobxjs/mobx-react-devtools#114 · 2 comments · 4 reactions ·
All issues in mobxjs/mobx-react-devtools
Similar issues
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Add: BuyPass TV Openchannels:add check:passed
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
S: triage
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100