From 66628ea4bd5b6ffc9a64671a0066ae2771388efc Mon Sep 17 00:00:00 2001 From: NielsJPeschel Date: Tue, 2 Apr 2024 15:30:53 -0400 Subject: [PATCH 1/2] update root README.md to include installation and prerequisites guide --- README.md | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index c4c38a4..f62d9f0 100644 --- a/README.md +++ b/README.md @@ -82,9 +82,33 @@ This repository contains various reusable hooks built and currently being used t ## Getting Started -Currently, `react-hooks` is not published in `npm`. Please see [Test Changes Locally](#test-locally) for a way to run our hooks locally +Run one of the following commands to add React Hooks to your project: + +**npm** +```shell +npm install @optum/react-hooks +``` + +or + + +**yarn** +```shell +yarn add @optum/react-hooks +``` + ### Prerequisites +#### Peer dependencies +Please note that [react](www.npmjs.com/package/react) and [react-dom](www.npmjs.com/package/react-dom) are peer dependencies, and should be installed _before_ installing React Hooks + +```json +"peerDependencies": { + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" +}, +``` +#### Package Manager Have desired javascript package mananger installed on your machine: * [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable) @@ -94,25 +118,12 @@ or * [npm](https://www.npmjs.com/package/npm) -**Optional** +_**Optional**_ * [yalc](https://github.com/wclr/yalc) * used for testing package locally - -### Installation -Currently, this package is not published and can therefore not be installed by conventional means (_yarn_ or _npm_). Please see next section if you still wish to utilize this pacakge locally - - -

(back to top)

-
+ ### Testing Changes Locally If you are in the process of making changes to this repo and wish to test them, or simply wish to playground with our hooks: From 6f863443dfaee39d00808f3ba8264bd62b4f937a Mon Sep 17 00:00:00 2001 From: NielsJPeschel Date: Tue, 2 Apr 2024 15:33:54 -0400 Subject: [PATCH 2/2] verbage change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f62d9f0..3282386 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ ## About The Project -This repository contains various reusable hooks built and currently being used throughout [Optum](https://optum.com). They were created with the goal of simplifying otherwise complex react procedures and concepts, such as state management of asynchronous data, accessibility, etc. Please feel free to explore this repository and use, contribute, and add to these hooks! +This library contains various reusable hooks built and currently being used throughout [Optum](https://optum.com). They were created with the goal of simplifying otherwise complex react procedures and concepts, such as state management of asynchronous data, accessibility, etc. Please feel free to explore this repository and use, contribute, and add to these hooks!

(back to top)