Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.


Sign Up

Articles related to "reactnative"


React Lifecycle Methods Explained

  • In this post, we'd discuss the lifecycle of a typical React Component.
  • Each component in React has several lifecycle methods that you can override to run code at particular times in the process.
  • Lifecycle methods can be used in ES6 Class Components but not in functional state components.
  • Sore eyes?

save | comments | report | share on


How to Setup React Native Web with Storybook

  • Create a file named webpack.config.js within the .storybook folder with an alias for React Native Web. Storybook is an excellent component development environment for React and other frameworks.
  • However, if you're using React Native Web or would like to create some RNW components with Storybook you'll need to add some more configuration.
  • Finally, run npm start in your terminal and hello world should be shown at http://localhost:8080/.
  • Run the app server again with npm start and you should see "Hello World" just as before, except this time the syntax matches React Native.
  • Assuming you have React, React Native Web, and Storybook set up properly, the only step left is to add an alias for the Storybook Webpack server to look for react-native imports within react-native-web.
  • Create a file named webpack.config.js within the .storybook folder that resolves an alias for React Native Web as shown below.

save | comments | report | share on