BenJeau / react-recoil-flipper-client

React Provider connecting to Flipper to log Recoil.js events
https://npmjs.com/package/react-recoil-flipper-client
0 stars 2 forks source link

Not recognizing RecoilRoot parent #1

Open AdamTyler opened 2 years ago

AdamTyler commented 2 years ago

Getting the following error Error: This component must be used inside a <RecoilRoot> component. However my component is indeed inside a RecoilRoot.

const App = () => {
  return (
    <RecoilRoot>
      <RecoilFlipperClient />
      <SafeAreaProvider>
        <ServicesProvider>
          <Nav />
        </ServicesProvider>
      </SafeAreaProvider>
    </RecoilRoot>
  );
};

I've tried putting the RecoilFlipperClient in multiple places within my component tree but still receive that same error

image
BenJeau commented 2 years ago

Mm that should work since its a children of <RecoilRoot />, let me try it. Maybe this is related a newer version of recoil.

Could you let me know the version that you are using alongside the react-native version? I know that it worked with recoil v0.4.1

AdamTyler commented 2 years ago

@BenJeau I'm on recoil: ^0.6.1 and react: 17.0.2, react-native: 0.66.3

AdamTyler commented 2 years ago

@BenJeau I downgraded recoil to 0.4.1 and I can confirm that it works

AdamTyler commented 2 years ago

@BenJeau are you planning to look into this issue? Doesn't seem to be any work on this plugin happening

caiorrs commented 1 year ago

@AdamTyler if that still helps, take a look at https://github.com/BenJeau/react-recoil-flipper-client/issues/2

caiorrs commented 1 year ago

@BenJeau https://github.com/BenJeau/react-recoil-flipper-client/pull/3