DEV Community

R Jones
R Jones

Posted on

React 19 not working with Recoil

When I'm creating a an atom and exporting it and when I'm using it through useRecoilState, my app is not working. The following error is thrown.

Uncaught TypeError: Cannot destructure property 'ReactCurrentDispatcher' of 'import_react.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' as it is undefined.
at currentRendererSupportsUseSyncExternalStore (recoil.js?v=c11f9f95:361:5)
at useRecoilValueLoadable (recoil.js?v=c11f9f95:3392:26)
at useRecoilValue (recoil.js?v=c11f9f95:3402:20)
at App (App.jsx:5:17)
at react-stack-bottom-frame (react-dom_client.js?v=c11f9f95:16192:20)
at renderWithHooks (react-dom_client.js?v=c11f9f95:4306:24)
at updateFunctionComponent (react-dom_client.js?v=c11f9f95:5972:21)
at beginWork (react-dom_client.js?v=c11f9f95:7048:20)
at runWithFiberInDEV (react-dom_client.js?v=c11f9f95:726:18)
at performUnitOfWork (react-dom_client.js?v=c11f9f95:10831:98)

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (1)

Collapse
 
sudo_sunil profile image
Sunil

*same issue *

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more