0.33.19 • Published 1 year ago

@eyecuelab/react-common v0.33.19

Weekly downloads
690
License
-
Repository
github
Last release
1 year ago

@eyecuelab/react-common

This is a library of React components and utilities, shared across EyeCue Lab projects.
Check out the documentation!

Usage

npm install --save @eyecuelab/react-common

Contributing

So, we are just starting off here, but these are some initial thoughts on coding standards. These will likely evolve as we continue to build out the library and learn things and discover patterns and all that good stuff.

General thoughts

  • Components should be written as functional components using hooks for state management, lifecycle hooks, etc. (checkout the docs for a refresher)
  • Styling should be done entirely with Styled Components (docs).
  • Including prop types is a must. It makes understanding and documenting components so much easier. (docs)

Documentation

Each component should have a dedicted storybook story showing off it's capabilities. These should be written in the component story format (docs).

Testing

  • Jest (docs)
  • React Testing Library (docs)
  • React Hooks Testing Library (docs)

Publishing

This project uses Semantic Versioning (website). And don't you forget it.

To publish a new version, make sure to update CHANGELOG.md and then run:

npm run release

This will allow to select an update type (major, minor, patch, etc.) and will update the version in package.json. You do not need to update package.json by hand.

Linking to local projects

Firstly, add the following aliases to the webpack config of the parent project:

alias: {
  react: path.resolve(__dirname, 'node_modules', 'react'),
  'react-dom': path.resolve(__dirname, 'node_modules', 'react-dom'),
  'styled-components': path.resolve(__dirname, 'node_modules', 'styled-components'),
},

The exact place this needs to go might differ by project, but for craco-powered projects this should go in the webpack section of the craco.config.js file. Basically when developing locally these libraries will exist in both react-common's node_modules and the parent project's node_modules. By providing these aliases to the parent project, it will always use its own local version of these modules, avoiding conflicts.

Next, run npm run link-dist or npm link ./dist in the root directory of react-common.

Finally run npm link @eyecue/react-common in the root directory of the parent project.

That's it! The parent project will now look at your local version of react-common. You can run npm run dev in the react-common directory to watch for changes and automatically rebuild (and those changes will show up in the parent project!). Be sure to keep in mind that any time you re-run npm install for the parent project, the link will be broken in favor of installing the deployed version of react-common, so you will need to re-run npm link @eyecue/react-common.

0.33.19

1 year ago

0.33.18

1 year ago

0.33.17

2 years ago

0.33.16

2 years ago

0.33.15

2 years ago

0.33.14

2 years ago

0.33.13

2 years ago

0.33.12

2 years ago

0.33.10

2 years ago

0.33.9

2 years ago

0.33.11

2 years ago

0.33.8

2 years ago

0.33.7

2 years ago

0.33.6

2 years ago

0.33.5

2 years ago

0.33.4

2 years ago

0.33.3

2 years ago

0.33.2

3 years ago

0.33.1

3 years ago

0.33.0

3 years ago

0.31.32

3 years ago

0.31.31

3 years ago

0.31.30

3 years ago

0.31.29

3 years ago

0.31.28

3 years ago

0.31.27

3 years ago

0.31.26

3 years ago

0.31.25

3 years ago

0.31.24

3 years ago

0.31.23

3 years ago

0.31.21

3 years ago

0.31.22

3 years ago

0.31.20

3 years ago

0.31.17

3 years ago

0.31.18

3 years ago

0.31.19

3 years ago

0.31.13

3 years ago

0.31.14

3 years ago

0.31.15

3 years ago

0.31.16

3 years ago

0.31.12

3 years ago

0.31.11

3 years ago

0.31.10

3 years ago

0.31.9

3 years ago

0.31.8

3 years ago

0.31.7

3 years ago

0.31.6

3 years ago

0.31.5

3 years ago

0.31.4

3 years ago

0.31.3

3 years ago

0.32.0

3 years ago

0.31.2

3 years ago

0.31.1

3 years ago

0.31.0

3 years ago

0.30.2

3 years ago

0.30.1

3 years ago

0.30.0

3 years ago

0.29.4

3 years ago

0.29.3

3 years ago

0.29.2

3 years ago

0.29.1

3 years ago

0.29.0

3 years ago

0.28.9

3 years ago

0.28.8

3 years ago

0.28.7

4 years ago

0.28.6

4 years ago

0.28.5

4 years ago

0.28.4

4 years ago

0.28.3

4 years ago

0.28.1

4 years ago

0.28.2

4 years ago

0.28.0

4 years ago

0.28.0-0

4 years ago

0.27.12

4 years ago

0.27.11

4 years ago

0.27.10

4 years ago

0.27.9

4 years ago

0.27.8

4 years ago

0.27.7

4 years ago

0.27.6

4 years ago

0.27.5

4 years ago

0.27.4

4 years ago

0.27.3

4 years ago

0.27.2

4 years ago

0.27.1

4 years ago

0.27.0

4 years ago

0.26.4

4 years ago

0.26.3

4 years ago

0.26.2

4 years ago

0.26.1

4 years ago

0.26.0

4 years ago

0.25.8

4 years ago

0.25.7

4 years ago

0.25.6

4 years ago

0.25.4

4 years ago

0.25.5

4 years ago

0.25.3

4 years ago

0.25.2

4 years ago

0.25.1

4 years ago

0.25.0

4 years ago

0.24.1

4 years ago

0.24.0

4 years ago

0.23.0

4 years ago

0.22.2

4 years ago

0.22.1

4 years ago

0.22.0

4 years ago

0.21.1

4 years ago

0.21.0

4 years ago

0.20.4

4 years ago

0.20.3

4 years ago

0.20.2

4 years ago

0.20.1

4 years ago

0.20.0

4 years ago

0.19.0

4 years ago

0.18.4

4 years ago

0.18.2

4 years ago

0.18.3

4 years ago

0.18.1

4 years ago

0.18.0

4 years ago

0.17.3

4 years ago

0.17.2

4 years ago

0.17.1

4 years ago

0.17.0

4 years ago

0.16.8

4 years ago

0.16.7

4 years ago

0.16.6

4 years ago

0.16.4

4 years ago

0.16.5

4 years ago

0.16.3

4 years ago

0.16.2

4 years ago

0.16.1

4 years ago

0.16.0

4 years ago

0.15.3

4 years ago

0.15.1

4 years ago

0.15.2

4 years ago

0.15.0

4 years ago

0.14.1

4 years ago

0.14.0

4 years ago

0.13.2

4 years ago

0.13.1

4 years ago

0.13.0

4 years ago

0.12.3

4 years ago

0.12.2

4 years ago

0.12.1

4 years ago

0.12.0

4 years ago

0.11.0

5 years ago

0.10.0

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.8.0

5 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.2

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.0.1

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago