This is a small application that serves as a playground to test react-formule.
Run yarn link-local
in react-formule, then run yarn link-local-lib
and yarn install
in formule-demo. To run the playground app, execute yarn dev
and visit localhost:3030
. You will see any changes in react-formule immediately in the playground app.
Another option (if you want to test the actual bundle, or if you want to link react-formule to a more complex application, which can be trickier) would be to use yalc. Run yarn build
and yalc publish
in react-formule, then run yalc add react-formule
in formule-demo. If you make changes in react-formule and want to update formule-demo with those changes, run yarn build
and yalc push
in react-formule, and then yarn dev --force
in formule-demo. Read the yalc docs for more info.
For more confort, you can also run yarn build:watch
in react-formule, which will rebuild the bundle and push the changes to yalc automatically. For even more automation, you can use vite-plugin-restart in formule-demo (or in your own project using react-formule and Vite) and watch the bundle file inside of the .yalc
folder, so that the Vite dev server is automatically reloaded once the new bundle is published. This advanced option is what we use to quickly test formule changes inside CAP.