| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
| slug | example |
|---|---|
| title | Example |
As soon as you installed ReScript React Native properly and have you ./package.json and ./bsconfig.json ready, you can create two files:
If you used our template as explained in the installation guide, you should already have these files.
No worries, you can copy paste this if needed without understanding the content for now. Documentation will explain everything 😇.
This can be you only JavaScript file if you want to be full ReScript! It's just a proxy to App.res application wrapper.
/**
* Do not modify this file - it is a proxy to your `App.re` file
* located in the `src/` folder.
*/
export { app as default } from "./src/App.bs.js";Please directly grab the App.res of our template, which will match React Native default Hello World!
Beside ReScript syntax that is a bit different with JavaScript, you may have noticed this major differences:
Now let's run this example.
In comparison with standard React Native development, the only thing you need to be sure that you have successfully compiled App.res as App.bs.js like we explained in the usage section.
As soon as ReScript compilation is successful, nothing should change for your development process. You can normally start your React Native app via react-native run-ios, react-native run-android or your classic web workflow if you use react-native-web!
| Back | FazBrowse Home | New Git URL |