Skip to content

Commit 76a7c8a

Browse files
Add getting started documentation (#30)
* update root README.md to include installation and prerequisites guide * verbage change
1 parent e710df2 commit 76a7c8a

File tree

1 file changed

+28
-17
lines changed

1 file changed

+28
-17
lines changed

README.md

+28-17
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,39 @@
7676
<!-- ABOUT THE PROJECT -->
7777
## About The Project
7878

79-
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!
79+
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!
8080

8181
<p align="right">(<a href="#top">back to top</a>)</p>
8282

8383
<!-- GETTING STARTED -->
8484
## Getting Started
85-
Currently, `react-hooks` is not published in `npm`. Please see [Test Changes Locally](#test-locally) for a way to run our hooks locally
85+
Run one of the following commands to add React Hooks to your project:
86+
87+
**npm**
88+
```shell
89+
npm install @optum/react-hooks
90+
```
91+
92+
or
93+
94+
95+
**yarn**
96+
```shell
97+
yarn add @optum/react-hooks
98+
```
99+
86100

87101
### Prerequisites
102+
#### Peer dependencies
103+
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
104+
105+
```json
106+
"peerDependencies": {
107+
"react": "^17.0.0 || ^18.0.0",
108+
"react-dom": "^17.0.0 || ^18.0.0"
109+
},
110+
```
111+
#### Package Manager
88112
Have desired javascript package mananger installed on your machine:
89113

90114
* [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable)
@@ -94,25 +118,12 @@ or
94118
* [npm](https://www.npmjs.com/package/npm)
95119

96120

97-
**Optional**
121+
_**Optional**_
98122
* [yalc](https://github.com/wclr/yalc)
99123
* used for testing package locally
100124

101-
102-
### Installation
103-
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
104-
<!-- 1. Clone the repo
105-
```sh
106-
git clone https://github.com/optum/react-hooks.git
107-
```
108-
2. Install NPM packages
109-
```sh
110-
yarn install
111-
``` -->
112-
113-
<p align="right">(<a href="#top">back to top</a>)</p>
114-
115125
<div id='test-locally'>
126+
116127
### Testing Changes Locally
117128
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:
118129

0 commit comments

Comments
 (0)