yamankatby / react-native-material

Modular and customizable Material Design UI components for React Native
https://rn-material.js.org
MIT License
223 stars 38 forks source link

"shadowOffset" is not supported by native animated module #64

Open gregstoos opened 4 months ago

gregstoos commented 4 months ago

When using Button I get an error on iOs: Style property "shadowOffset" is not supported by native animated module

Vasu3337 commented 4 months ago

Im using FAB component in my ios app ..

import React, { useState } from "react"; import { Stack, FAB, Switch } from "@react-native-material/core"; const App = () => { const [loading, setLoading] = useState(true); return ( <Stack fill center spacing={4}> <Switch value={loading} onValueChange={setLoading} /> <FAB color="primary" loading={loading} /> </Stack> ); }; export default App;

i got error like

Error: Style property 'shadowOffset' is not supported by native animated module

Screenshot 2024-02-23 at 6 08 37 PM

joumanam commented 4 months ago

I am getting the same error although this was working fine in another project..

michele6000 commented 4 months ago

same error using Button :/ @yamankatby any news on fix ?

I found this, https://github.com/callstack/react-native-paper/issues/4224 same problem other library

yamankatby commented 4 months ago

Hello everyone!

It seems we're encountering a trending issue following a recent React Native update. Unfortunately, I'm currently pressed for time and unable to address and test a fix immediately. I'll make an effort to allocate some time for this issue soon, although I cannot make any promises.

Interestingly, a similar problem was identified and resolved in the React Native Paper library. If anyone is willing to review the solution implemented there https://github.com/callstack/react-native-paper/pull/4246 and submit a pull request for our project, I would greatly appreciate it. I'm eager to review any contributions and will ensure they are merged promptly.

Thank you for your understanding and cooperation!

jddiegel commented 1 month ago

IS there a fix for this or possible work around. Seems to be introduced when upgrading react-native. Possibly introduced in 0.73. What about the PR from @federicoparroni

AkbarBakhshi commented 1 month ago

Any update on this? I am getting the same issue with import { Button } from '@react-native-material/core'.

Avan95viiknesh commented 2 weeks ago

Any update on this? I am getting the same issue with import { Button } from '@react-native-material/core'.

i am also getting error from this same library can anyone tell about how to fix this issue ..issue comes from after upgrading expo 49 to 51

yuvrajchaudhari03 commented 1 week ago

facing the same issue. Is there any update on this?

Nolanjue commented 4 days ago

Error occurred after Expo SDK 51 update: "ERROR Error: Style property 'shadowOffset' is not supported by native animated module, js engine: hermes".

There are no direct explanations on how to diagnose this issue as https://github.com/callstack/react-native-paper/issues/4224 does not seem applicable.

However, I assume that this issue is caused by the react-native-paper dependency not being supported by another dependency(in my case Hermes), which causes the issue of the onclick of the button due to React/expo updates.

Only way as of yet for me to solve this issue is to remove the "mode" parameter in Button components that include 'elevated' as a value. I assume this is because 'elevated' makes a specific shadow effect from react-native-paper that isn't supported by another module. As shown:

```<Button mode='elevated' />  ```
    to
```<Button/> ```

If anyone finds a more permanent solution, that would be great.