Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No documentation about shadow* style props being deprecated #2620

Closed
1 task done
jkjustjoshing opened this issue Dec 12, 2023 · 3 comments
Closed
1 task done

No documentation about shadow* style props being deprecated #2620

jkjustjoshing opened this issue Dec 12, 2023 · 3 comments
Labels
enhancement Requires extension or creation of new React Native API

Comments

@jkjustjoshing
Copy link

Is there an existing request?

  • I have searched for this request

Describe the feature request

I'm getting the following warning in my console

image

However, when I search this repo and the React Native docs, I can't find anything giving me more information about this, or telling me which versions this impacts. Is this a React Native thing or a React Native Web thing?

It seems like this warning was introduced in this commit as part of this PR, but I don't see any additional discussion of these style properties there either.

@jkjustjoshing jkjustjoshing added the enhancement Requires extension or creation of new React Native API label Dec 12, 2023
@necolas
Copy link
Owner

necolas commented Dec 12, 2023

The warning is coming from react-native-web. The shadow* props are iOS-only in React Native, and have very different results form web boxShadow - it's not safe to rely on shadow* props for any platform other than iOS. You should use boxShadow and generally assume you should only use web CSS properties in react-native-web, many of which have been polyfilled in React Native this year.

@necolas necolas closed this as completed Dec 12, 2023
@stellarskye
Copy link

stellarskye commented Apr 22, 2024

I dont understand, boxShadow is not recognized in React-Native?

edit - I see the solution in the other thread - #2355 (comment)

@jkjustjoshing
Copy link
Author

Thanks for the link, @stellarskye.

For anyone coming across this ticket looking for a way to stop Typescript errors, here is documentation that may help https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requires extension or creation of new React Native API
Projects
None yet
Development

No branches or pull requests

3 participants