Set up a React App and build it as a Web Component
This setup is is based on react-scripts from create-react-app
A thorough description of the principles used in this setup, can be read in this article
Features include
✔ Full Webpack control
✔ Bundling multiple components together
✔ Data-sharing and interactions between components
✔ Passing child elements to the component
✔ Plugins for varies purposes: font-loading, external scripts, styled-components, and more ...
Get started
Start by downloading the cli:
npm i -g direflow-cli
Create a new Direflow Component
direflow create -c
This will bootstrap a new Direflow Component for you.
Now use the following commands:
cd <project-folder>
yarn install
yarn start
Your Direflow Component will start running on localhost:3000
and your browser opens a new window
Create a new Direflow Project
direflow create -p
Now cd into the project, and create the first Direflow Component
cd <project-name>
direflow create -c
This will create a folder called direflow-components
, which will contain all Direflow Components related to the project.
Contributing
Issues
In the case of a bug report, bugfix or a suggestions, please feel very free to open an issue.
Pull request
Pull requests are always welcome, and I'll do my best to do reviews as fast as I can.
License
This project is licensed under the MIT License
Get Help
Read more about using Web Components with React on the official React Docs