Recoilize
Recoilize copied to clipboard
index.js:201 Uncaught TypeError: Cannot read properties of undefined (reading '_internalRoot') at createDevToolDataObject (index.js:201:1)
I just install recoilize to chrome https://chrome.google.com/webstore/detail/recoilize/jhfmmdhbinleghabnblahfjfalfgidik
and install the npm package "recoilize": "^3.1.6",
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<StrictMode>
<RecoilRoot>
<RecoilizeDebugger />
....SOME OTHE COMPONENTS
</RecoilRoot>
</StrictMode>
);
and I get this error:
index.js:201 Uncaught TypeError: Cannot read properties of undefined (reading '_internalRoot')
at createDevToolDataObject (index.js:201:1)
at index.js:98:1
at commitHookEffectListMount (react-dom.development.js:23150:1)
at commitPassiveMountOnFiber (react-dom.development.js:24926:1)
at commitPassiveMountEffects_complete (react-dom.development.js:24891:1)
at commitPassiveMountEffects_begin (react-dom.development.js:24878:1)
at commitPassiveMountEffects (react-dom.development.js:24866:1)
at flushPassiveEffectsImpl (react-dom.development.js:27039:1)
at flushPassiveEffects (react-dom.development.js:26984:1)
at react-dom.development.js:26769:1
For some reason _reactRootContainer is not define recoilizeRoot._reactRootContainer
const createDevToolDataObject = (filteredSnapshot, diff, atomsAndSelectors) => {
if (diff === undefined) {
return {
filteredSnapshot: filteredSnapshot,
componentAtomTree: formatFiberNodes(
recoilizeRoot._reactRootContainer._internalRoot.current,
),
atomsAndSelectors,
};
} else {
return {
filteredSnapshot: filteredSnapshot,
componentAtomTree: formatFiberNodes(
recoilizeRoot._reactRootContainer._internalRoot.current,
),
indexDiff: diff,
atomsAndSelectors,
};
}
};
I'm also experiencing this. I was wondering if there is a workaround?
I am also suffering from this issue.
Even passing the root app doesn't work: <RecoilizeDebugger root={root} />
I solved it with this https://github.com/open-source-labs/Recoilize/pull/172#issuecomment-1319585299
It's not great, but better than it just not working at all.
Yeah, unfortunately I don't think that's not an adequate fix for most of us. I was pretty hyped to add it back in today, but let down when I ran into this issue because I was tracking #172 but it didn't solve the problem.
This issue is also tracked here: https://github.com/open-source-labs/Recoilize/issues/165
Yeah, unfortunately I don't think that's not an adequate fix for most of us. I was pretty hyped to add it back in today, but let down when I ran into this issue because I was tracking #172 but it didn't solve the problem.
This issue is also tracked here: #165
@mawburn
I honestly just switched to Jotai. Jotai is atom-based state just like Recoil but with none of the sharp edges... And it's actively being developed.
I think this library has been abandoned, the last commit was ages ago. Does anyone know of a good alternative?
I honestly just switched to Jotai. Jotai is atom-based state just like Recoil but with none of the sharp edges... And it's actively being developed.
My team hasn't had any issues with Recoil and it seems to be in active development. Just this helper plugin seems to be abandoned.
- https://github.com/facebookexperimental/Recoil/releases
- https://github.com/facebookexperimental/Recoil/commits/main
Either way, I was just posting to let other people know who are running into this issue.
Sorry, I was referring to this plugin.