We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Create styled-components package wrapper that lets you use components without react-native-web.
styled-components
react-native-web
This may be necessary for styled-components/primitives SSR support, or for use cases where react-native-web isn't installed.
styled-components/primitives
We should encourage the use of styled-components/primitives instead, in documentation.
This could be a new package like @react-platform/styled
@react-platform/styled
Pseudo-code for the wrapper:
const styled = Platform.select({ web: () => require('styled-components'), default: () => require('styled-components/primitives'), })(); if (Platform.OS === 'web') { styled.View = styled.div; styled.Text = styled.span; styled.Image = styled.img; } else { styled.div = styled.View; styled.img = styled.Image; styled.span = styled.Text; } module.exports = styled;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Create
styled-components
package wrapper that lets you use components withoutreact-native-web
.This may be necessary for
styled-components/primitives
SSR support, or for use cases wherereact-native-web
isn't installed.We should encourage the use of
styled-components/primitives
instead, in documentation.This could be a new package like
@react-platform/styled
Pseudo-code for the wrapper:
The text was updated successfully, but these errors were encountered: