@laerdal/analytics-react-components
v1.12.0
Published
Laerdal react component library for Analytics.
Downloads
338
Maintainers
Keywords
Readme
Laerdal React component library for Analytics
How to use @laerdal/analytics-react-components
- Add the package to your project:
cd /path/to/your-app
yarn add @laerdal/analytics-react-components
ornpm add @laerdal/analytics-react-components
- Import components in your code:
import { <ComponentName> } from '@laerdal/analytics-react-components'
How to use a local version of @laerdal/analytics-react-components
- Pull the latest version of @laerdal/analytics-react-components from Github.
- If you have not already, add @laerdal/analytics-react-components to your application:
cd /path/to/your-app
yarn add @laerdal/analytics-react-components
ornpm add @laerdal/analytics-react-components
- Create a link from your-app to component-library
cd /path/to/analytics-react-components
yarn link
cd /path/to/your-app
yarn link @laerdal/analytics-react-components
Invalid hook call warning
When you start your application, you might get an “Invalid Hook Call Warning”. This is because both component-library and your-app loads their own version of react and react dom. Make sure component-library uses the same version of react and react-dom as your-app uses:
cd /path/to/your-app/node_modules/react
yarn link
cd /path/to/your-app/node_modules/react-dom
yarn link
cd /path/to/analytics-react-components
yarn link react react-dom
yarn link
cd /path/to/your-app
yarn link @laerdal/analytics-react-components
Contribution
We utilize github actions to automatically publish this library - please include the following words in branch names to influence the semantic version.
major: "BREAKING CHANGE" or "MAJOR"
minor: "feature"
patch: This is the default increment if the above words aren't included.