Why you should learn about React Native for Web
Installing the tools you need
Start with installing Node and NPM on your machine. Then run the command npm install -g react-native-cli from terminal, which will fetch the latest version of React Native for you. To test whether or not it has been successfully installed, open up terminal and type react-native –version without quotes. If it installs correctly, it should show you what version of RN is currently being used by default.
Writing your first code in JSX
It is easier than you might think to start building a React app. Let’s take a look at how you might do it by writing the following simple Hello World app in React Native for Web! It is based on Create-React-App, so there are no dependencies to install before starting your project.
Components in React
Components are the fundamental building blocks of any modern UI framework. They can be as simple as a button, or as complex as a fullscreen carousel with dozens of options.
Styling in React
CSS is a pain when it comes to styling individual components. For example, if we have a menu item and we want there to be some space below it (similar to how the spacing works on Google Maps) then we might use CSS styles like these:
A simple application in React Native
Now that you have learned a little about the basics of working with React Native, it’s time to build something! In this example, we are going to create a simple voting application that has different opinions and everyone can vote on them.
And finally, publishing it as a web app