nandorojo / moti

🐼 The React Native (+ Web) animation library, powered by Reanimated 3.
https://moti.fyi
MIT License
3.9k stars 120 forks source link

moti is not working in expo router project with Expo sdk 49 #349

Open duochizhacai opened 1 month ago

duochizhacai commented 1 month ago

Is there an existing issue for this?

Do you want this issue prioritized?

Current Behavior

i was using npx create-expo-app@latest --template tabs@49 to create a expo project with expo sdk 49, but it is not working with error (0 , _framerMotion.usePresence) is not a function

Expected Behavior

No response

Steps To Reproduce

  1. create new Expo router project with sdk49. command: npx create-expo-app@latest --template tabs@49
  2. install moti dependency
  3. use moti component
  4. get into an error

(0 , _framerMotion.usePresence) is not a function

Call Stack Moti node_modules/moti/build/core/motify.js:14:15 renderWithHooks node_modules/react-dom/cjs/react-dom.development.js:16307:7 updateForwardRef node_modules/react-dom/cjs/react-dom.development.js:19229:10 beginWork node_modules/react-dom/cjs/react-dom.development.js:21639:10 HTMLUnknownElement.callCallback node_modules/react-dom/cjs/react-dom.development.js:4166:9 Object.invokeGuardedCallbackDev node_modules/react-dom/cjs/react-dom.development.js:4216:16 invokeGuardedCallback node_modules/react-dom/cjs/react-dom.development.js:4279 beginWork$1 http://localhost:8081/index.bundle

image

Versions

- Moti: 0.29.0
- Reanimated: 3.11.0
- React Native: 0.72.6

Screenshots

No response

Reproduction

https://codesandbox.io/p/devbox/qh92f2?file=%2Fapp%2Fmodal.tsx%3A3%2C42

this sandbox can not see through the problem, but it can show precise error if you reproduce in the local