Skip to content

Commit

Permalink
feat(deps): Allow consumers to use newer uswds minor versions (#2600)
Browse files Browse the repository at this point in the history
Co-authored-by: Mazdak Atighi <[email protected]>
  • Loading branch information
brandonlenz and rswerve authored Sep 29, 2023
1 parent 12ab348 commit 36c1c8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ npm i @trussworks/react-uswds

### USWDS

It is strongly suggested applications use the same version of USWDS that was used to build the version of ReactUSWDS they're using. A version mismatch may result in unexpected markup & CSS combinations.
It is strongly suggested applications use the same version of USWDS that was used to build the version of ReactUSWDS they're using (see this repo's uswds `devDependency` in [package.json](./package.json)).
A version mismatch may result in unexpected markup & CSS combinations.
For flexibility, ReactUSWDS will not trigger warnings if consumers choose to use a higher minor version of `uswds` (hence the careted uswds `peerDependency` in [package.json](./package.json)).
If encountering unexpected markup issues when choosing _not_ to use the matching `devDependency` version of `uswds`, consumers should check whether aligning the versions resolves their issue(s).

You can import ReactUSWDS components using ES6 syntax:

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
"homepage": "https://github.com/trussworks/react-uswds#readme",
"peerDependencies": {
"@uswds/uswds": "3.6.0",
"@uswds/uswds": "^3.6.0",
"react": "^16.x || ^17.x || ^18.x",
"react-dom": "^16.x || ^17.x || ^18.x"
},
Expand Down

0 comments on commit 36c1c8a

Please sign in to comment.