The generated storybook can be used to develop, test, review and find react components which, once exported in index.js, can be directly imported in some react app. Corresponding app(s), which depends on this package, should be part of a npm workspaces setup.
If apps are build with Unidirectional Data Flow paradigm, this can help to segregate usage of local state (e.g. by react useState hook): It will not (or rarely) occure within app's code.
Also styling efforts will not (or rarely) occure in app's code.
The code of app's views is more focused on behaviour.
i18next and react-i18next is used for localization
- git
- latest node and npm
- Change into you scope directory, where your packages (of corrsesponding scope) are.
- Create a directory with name of your package. Convention is lower case and hyphen-separated, for instance "your-package-name":
mkdir your-package-name
- Change into this directory
cd your-package-name
- Create the scaffolding. You will be asked for some global settings, which will be saved in package.json:
npx -p @pubcore/generator-storybook-mui -p yo yo @pubcore/storybook-mui
- start storybook, If TLS is required (https), enable it in .env file
npm start