bgaleotti / react-query-native-devtools

162 stars 19 forks source link

Plugin 'flipper-plugin-react-query-native-devtools' is unavailable #60

Closed koreus7 closed 2 years ago

koreus7 commented 3 years ago

Flipper is telling me the plugin is unavailable.

Environment: Seen On: iOS 14 simulator OS: macOS 11.4 Flipper App: 0.96.1 "react-native": "0.64.0", "react": "17.0.1", "react-query-native-devtools": "^3.0.1", "react-native-flipper": "^0.96.1" "react-query": "^3.8.2", "flipper-plugin-react-query-native-devtools": "^3.0.0",

// App.ts
import {
  QueryClient,
  QueryClientProvider,
} from 'react-query';
import { addPlugin } from 'react-query-native-devtools';
const queryClient = new QueryClient();

if (__DEV__) {
  addPlugin({queryClient});
}
...

Things i've tried:

willerrodrigo commented 3 years ago

Hi, @koreus7

Make sure you using the latest Flipper SDK on the project: https://fbflipper.com/docs/getting-started/react-native#using-the-latest-flipper-sdk

Arcaneless commented 3 years ago

I am having the same issue, I am using the latest flipper sdk.

Arcaneless commented 3 years ago

I am having the same issue, I am using the latest Flipper sdk.

It turns out that I've installed a wrong Flipper plugin, it's the devtool from react-query official. Search flipper-plugin-react-query-native-devtools in Flipper directly.

bgaleotti commented 3 years ago

I am having the same issue, I am using the latest Flipper sdk.

It turns out that I've installed a wrong Flipper plugin, it's the devtool from react-query official. Search flipper-plugin-react-query-native-devtools in Flipper directly.

@koreus7 could you check?

apatel369 commented 2 years ago

same issue. I am using the latest flipper.

DenisIrkhin commented 2 years ago

Please try to catch an error to see if we have one.

And initiating react-query-native-devtools when we are in DEV env probably could be a better pattern?

if (__DEV__) {
  const wrapper = { queryClient };
  import('react-query-native-devtools')
    .then(({ addPlugin }) => {
      addPlugin(wrapper);
    })
    .catch((err) => logger.info('Error when initializing React Query Flipper plug-in', err));
}
apatel369 commented 2 years ago

Upgraded flipper to 0.127.0 and it is working now

bgaleotti commented 2 years ago

I will close this as looks like a misconfiguration problem.

sregg commented 2 years ago

I don't see flipper-plugin-react-query-native-devtools in Flipper. I only see react-query-devtools and react-query-native-devtools. I'm guessing the right one is react-query-native-devtools.

image