Up your React game with Views
How to try Views on an existing React project?
Pre-requisites: your project was created with
create-react-native-app, you have version control
The biggest benefit of using Views in your React project is letting designers contribute to interface styling, so you can have more time to focus on your app’s logic. Yup, no hand-off is already possible and it’s your opportunity to stop loosing time on countless design iterations.
Commands to run from your app’s folder
# install use views globally
npm i -g @viewstools/use
# install views on it
# clean up
git checkout src/App.css
git checkout src/App.js
git checkout src/App.test.js
git checkout src/index.js
git checkout src/logo.svg
git checkout App.js
Note: If you don’t have the files for check out, ignore the errors, or don’t run the
How to use Views generated React components?
When Views Morpher compiles your
.view files, it creates a
.view.js file for each of them. For example,
src/Main/App.view will be compiled to
src/Main/App.view.js, if you want to use it in your own component, import it at the top of that file like
import ViewsFeature from './Main/App.view.js' and use it like you would any other React component