gluestack-ui icon indicating copy to clipboard operation
gluestack-ui copied to clipboard

Toast Error on Expo SDK 49 on android and ios

Open neverson-silva opened this issue 1 year ago • 4 comments

Description

TypeError: Cannot set property 'current' of null when using toast on android an ios

CodeSandbox/Snack link

NA

Steps to reproduce

i'm trying to use toast on expo sdk 49

on web I'm receiving the same error as related here https://github.com/gluestack/gluestack-ui/issues/1615

on android and ios I'm receiving another error

"TypeError: Cannot set property 'current' of null""

packages: "@gluestack-ui/toast": "^1.0.3", "@gluestack-style/react": "^1.0.38", "expo": "~49.0.15",

OS: Mac OS

I've tried with moti and @legendapp/motion

export const Wrapper = styled(AnimatedView, {}, { componentName: 'ToastAnimationWrapper', } as const);

export const useToast = createToastHook(Wrapper, AnimatePresence);

export const Description = styled(Text, {}, { componentName: 'ToastDescription', ancestorStyle: ['_description'], } as const);

const Root = styled(View, {}, { componentName: 'Toastg', descendantStyle: ['_icon', '_title', '_description'], } as const);

const Title = styled(Text, {}, { componentName: 'ToastTitle', ancestorStyle: ['_title'], } as const);

export const Toast = createToast({ Root, Title, Description, });

gluestack-ui Version

"@gluestack-ui/toast": "^1.0.3"

Platform

  • [X] Expo
  • [ ] React Native CLI
  • [ ] Next
  • [ ] Web
  • [X] Android
  • [X] iOS

Other Platform

No response

Additional Information

No response

neverson-silva avatar Jan 17 '24 22:01 neverson-silva

@neverson-silva Thanks for reporting this. We'll try to reproduce and update you on this. You can try out Expo SDK 48 for now.

surajahmed avatar Jan 31 '24 06:01 surajahmed

I see it too. The error occurs just by inserting the line const toast = useToast().

jezzdk avatar Feb 13 '24 22:02 jezzdk

Any solution to fix it?

tohsaka888 avatar Feb 25 '24 02:02 tohsaka888

Would love to use this component, looks way better than alternatives, bu running into this issue as well. Expo SDK 50

drewjenkins avatar Apr 17 '24 22:04 drewjenkins