Created
March 24, 2020 18:25
-
-
Save majirosstefan/23f86cb7f3b9d2055d77f1147f2cf7ab to your computer and use it in GitHub Desktop.
React-Native Components To React-Native-Web Components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// your component written for react-native - how the metro bundler see it | |
import {View, Text} from "react-native"; | |
const MyComponent = () => { | |
return( | |
<View> | |
<Text>Hello</Text> | |
</View> | |
) | |
} | |
// this is what we want - to make the Storybook's webpack to use the following instead of the previous example | |
import {View, Text} from "react-native-web"; | |
const MyComponent = () => { | |
return( | |
<View> | |
<Text>Hello</Text> | |
</View> | |
) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment