facebookexperimental / Recoil

Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.
https://recoiljs.org/
MIT License
19.6k stars 1.19k forks source link

Support without react-dom #2138

Open ayroblu opened 1 year ago

ayroblu commented 1 year ago

Hi, I saw #99 but I'm not using react-native. I'm trying to build an extension on Raycast and was wondering if recoil requires react-dom?

I get the following error when I try to add it:

build failed (node_modules/recoil/cjs/index.js:8:39 var reactDom = _interopDefault(require('react-dom'));): Could not resolve "react-dom"
mondaychen commented 1 year ago

Yes it requires either react-dom or react-native. I don't know much about Raycast. Does it not use react-dom?

ayroblu commented 1 year ago

No it uses React as a presentation layer on top of macOS native similar to react-native (to the best of my understanding). They leverage react-reconciler to achieve this.