react-query-auth icon indicating copy to clipboard operation
react-query-auth copied to clipboard

Not working with React Native

Open rcfrias opened this issue 3 years ago • 2 comments

As soon as you try to use the AuthProvider, the followin error appears:

ExceptionsManager.js:149 Error: Text strings must be rendered within a <Text> component.

rcfrias avatar Jun 29 '22 18:06 rcfrias

Hi there,

I am suspecting that the error is caused by these lines: https://github.com/alan2207/react-query-auth/blob/5c35632bffa55eead0801dda4d0787e907759e07/src/index.tsx#L66 https://github.com/alan2207/react-query-auth/blob/5c35632bffa55eead0801dda4d0787e907759e07/src/index.tsx#L68

div is not valid element in RN, so you can try to provide your own LoaderComponent and ErrorComponent compatible with RN.

alan2207 avatar Jun 29 '22 18:06 alan2207

I modified the code to work with react native

ugoconsonni avatar Sep 24 '22 15:09 ugoconsonni

Hey folks, you might want to install the latest version, which is platform agnostic.

alan2207 avatar Jan 01 '23 17:01 alan2207