@ptolemy2002/react-mount-effects 1.1.2 → 1.1.4

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.
Files changed (2) hide show
  1. package/README.md +8 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # React Library CRA Template
1
+ # React Mount Effects
2
2
  React allows `useEffect(() => {callback()}, [])` to run the callback only on first mount, thus `useEffect(() => callback, [])` only runs on unmounting. However, eslint often complains about this. This library manually suppresses those warnings and exports the hooks for convenience sake.
3
3
 
4
4
  The hooks are not exported as default, so you can import in one of the following ways:
@@ -15,6 +15,13 @@ Both hooks take only one argument, the callback.
15
15
  This is a React Library Created by Ptolemy2002's [cra-template-react-library](https://www.npmjs.com/package/@ptolemy2002/cra-template-react-library) template in combination with [create-react-app](https://www.npmjs.com/package/create-react-app). It contains methods of building and publishing your library to npm.
16
16
  For now, the library makes use of React 18 and does not use TypeScript.
17
17
 
18
+ ## Peer Dependencies
19
+ These should be installed in order to use the library, as npm does not automatically add peer dependencies to your project.
20
+ - @types/react: ^18.3.3
21
+ - @types/react-dom: ^18.3.0
22
+ - react: ^18.3.1
23
+ - react-dom: ^18.3.1
24
+
18
25
  ## Commands
19
26
  The following commands exist in the project:
20
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptolemy2002/react-mount-effects",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "main": "index.js",
5
5
  "files": [
6
6
  "index.js"