881 B
881 B
Refactoring Modules for use within Master app
- Add
basename={window.location.pathname}to BrowserRouter props in App.js. - Update Router paths. Remove home, callback routes.
- Remove Material-ui theme provider.
- Remove Apollo React.
- Update auth handling. Pass as props or pull from local storage.
- Remove header and footer.
- Update Material-UI Typography variants
- Add react hot module:
npm i react-hot-loader -D
Developing Module with Master App
Setup
The symlinks in
- Navigate to your module client.
- Run
npm link - Navigate
MasterApp/client. - Run
npm link [you-module-package]. egnpm link @superalgos/teams-client - Start server:
npm run dev - When a change is made in your module, after a second or two, the browser page should update without reloading.