react-native-material icon indicating copy to clipboard operation
react-native-material copied to clipboard

"shadowOffset" is not supported by native animated module

Open gregstoos opened this issue 1 year ago • 10 comments

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

gregstoos avatar Feb 23 '24 10:02 gregstoos

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

Vasu3337 avatar Feb 23 '24 12:02 Vasu3337

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

joumanam avatar Feb 23 '24 19:02 joumanam

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

michele6000 avatar Feb 27 '24 15:02 michele6000

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!

yamankatby avatar Feb 27 '24 18:02 yamankatby

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

jddiegel avatar May 10 '24 18:05 jddiegel

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

AkbarBakhshi avatar May 26 '24 18:05 AkbarBakhshi

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

Avan95viiknesh avatar Jun 17 '24 06:06 Avan95viiknesh

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

yuvrajchaudhari03 avatar Jun 20 '24 10:06 yuvrajchaudhari03

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.

Nolanjue avatar Jun 28 '24 04:06 Nolanjue

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 callstack/react-native-paper#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.

Did you fix it?

cellamarematias avatar Jul 23 '24 17:07 cellamarematias