genesys-react-components 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,12 +12,6 @@ A React component library containing standardized form elements. Check out the l
|
|
|
12
12
|
npm i genesys-react-components
|
|
13
13
|
# install peer dependencies if necessary
|
|
14
14
|
npm i genesys-dev-icons uuid
|
|
15
|
-
|
|
16
|
-
# or
|
|
17
|
-
|
|
18
|
-
yarn add genesys-react-components
|
|
19
|
-
# install peer dependencies if necessary
|
|
20
|
-
yarn add genesys-dev-icons uuid
|
|
21
15
|
```
|
|
22
16
|
|
|
23
17
|
## Usage
|
|
@@ -77,8 +71,8 @@ To build and serve the demo app locally, run:
|
|
|
77
71
|
|
|
78
72
|
```sh
|
|
79
73
|
cd app
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
npm install
|
|
75
|
+
npm run start
|
|
82
76
|
```
|
|
83
77
|
|
|
84
78
|
To validate the local instance of the `genesys-react-components` package, run:
|
|
@@ -86,11 +80,11 @@ To validate the local instance of the `genesys-react-components` package, run:
|
|
|
86
80
|
```sh
|
|
87
81
|
cd app
|
|
88
82
|
# This removes the published dependency and uses npm link to add the local version
|
|
89
|
-
|
|
90
|
-
|
|
83
|
+
npm run link
|
|
84
|
+
npm run start
|
|
91
85
|
```
|
|
92
86
|
|
|
93
|
-
Run `
|
|
87
|
+
Run `npm run unlink` to revert to using the latest published version of the package.
|
|
94
88
|
|
|
95
89
|
#### Publishing the demo app
|
|
96
90
|
|
|
@@ -112,4 +106,4 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
112
106
|
|
|
113
107
|
The cause of the issue is the first reason. The react-dom dependency is sourced from different locations for the component package and the React app that's using it. The package loads `<thisrepo>/node_modules/react_dom/` but the React app loads `<thisrepo>/app/node_modules/react-dom/` causing them to be different packages even though the loaded versions are identical.
|
|
114
108
|
|
|
115
|
-
The solution is to delete `<thisrepo>/node_modules/` when using `npm link` in a any local React app. It doesn't seem to matter the order of operations as long as the folder is gone before `
|
|
109
|
+
The solution is to delete `<thisrepo>/node_modules/` when using `npm link` in a any local React app. It doesn't seem to matter the order of operations as long as the folder is gone before `npm run start` is run to build the React app.
|