@tsminh/spreacte
v1.0.0
Published
A simple demo app is available in the `demo/` directory. The demo is configured with Create React App and CRACO so it can resolve the local module source.
Readme
spreacte
Demo
A simple demo app is available in the demo/ directory. The demo is configured with Create React App and CRACO so it can resolve the local module source.
Setup
- From
d:\REPO\spreacteinstall root dependencies:yarn install
- From
d:\REPO\spreacte\demoinstall demo dependencies:yarn install
Run the demo
- In one terminal, start the root package watcher to rebuild local module changes:
yarn watch
- In another terminal, start the demo app:
cd demo && yarn start
Local development workflow
- Edit source code in
src/at the root package. - The root watcher rebuilds the package output.
- CRA in
demo/is configured to import the local module source and should reload when the demo file tree changes.
Optional: yarn link workflow
- In
d:\REPO\spreacterun:yarn link
- In
d:\REPO\spreacte\demorun:yarn link "@tsminh/spreacte"
- Start the demo:
cd demo && yarn start
When you are done, unlink with:
yarn unlink "@tsminh/spreacte"indemoyarn unlinkin root
What the demo shows
GlobalContextProviderwrapping consumer contentBoxcomponent layout and responsive sizinguseModalhook to open and close a modalutils.numberWithCommasandutils.isDevusage
