Skip to content

Instantly share code, notes, and snippets.

@majirosstefan
Created March 24, 2020 18:25
Show Gist options
  • Save majirosstefan/23f86cb7f3b9d2055d77f1147f2cf7ab to your computer and use it in GitHub Desktop.
Save majirosstefan/23f86cb7f3b9d2055d77f1147f2cf7ab to your computer and use it in GitHub Desktop.
React-Native Components To React-Native-Web Components
// 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