Skip to content

Commit df5a945

Browse files
John Richard Chipps-HardingPaulo Miguel Ferreira Jorge
andauthored
Dependency updates and minor documentation changes (#4)
* Dependency updates and minor documentation changes * example function names * chore(readme): update input types Co-authored-by: Paulo Miguel Ferreira Jorge <[email protected]>
1 parent c59a798 commit df5a945

File tree

7 files changed

+1240
-307
lines changed

7 files changed

+1240
-307
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @digitaljohn
1+
* @digitaljohn @PauloMFJ

.github/ISSUE_TEMPLATE/REPORT_A_BUG.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ about: "Is something not working as you expect?"
77

88
> Clearly describe the bug
99
10-
e.g. "Data refuses to load when accessing via https..."
10+
e.g. "Data does not persist upon refresh."
1111

1212
> Which version of use-local-state are you using?
1313
@@ -19,23 +19,19 @@ e.g. `16.9.0`
1919

2020
> What build/platform are you using?
2121
22-
e.g. "Gatsby"
22+
e.g. "Next.js 10"
2323

2424
> What did you expect to happen?
2525
26-
e.g. "Data to load."
26+
e.g. "Updated value to be persisted."
2727

2828
> What actually happened (e.g. what warnings or errors did you get)?
2929
30-
e.g. "The request just hung, no response."
30+
e.g. "Hook always returns default state."
3131

3232
<!--
33-
Before posting, please check that the bug hasn't already been:
34-
1. fixed in the next release (https://github.com/phantomstudios/use-local-state/blob/master/CHANGELOG.md)
35-
2. discussed previously (https://github.com/phantomstudios/use-local-state/search)
36-
-->
33+
Before posting, please check that the bug hasn't already been discussed previously (https://github.com/phantomstudios/use-local-state/search)
3734
38-
<!--
3935
You can help us fix the bug more quickly by:
4036
1. Figuring out what needs to be done and proposing it
4137
2. Submitting a PR with failing tests.

.github/ISSUE_TEMPLATE/REPORT_A_DOCS_ISSUE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ about: "Is something wrong, confusing or missing in the docs?"
77

88
> Clearly describe the documentation issue
99
10-
e.g. "The description of the `refresh` function needs expanding..."
10+
e.g. "Documentation for setting updated state is required."
1111

1212
> What solution would you like to see?
1313

.github/ISSUE_TEMPLATE/REQUEST_A_FEATURE.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@ about: "Do you want to suggest a new feature?"
77

88
> What is the problem you're trying to solve?
99
10-
e.g. "We need the ability to make basic POST requests and send a JSON payload..."
10+
e.g. "We need the ability reset and or clear the state..."
1111

1212
> What solution would you like to see?
1313
14-
e.g. "A new input argument that accepts..."
14+
e.g. "Expose a new method that..."
1515

1616
<!--
17-
Before posting, please check that the feature hasn't already been:
18-
1. added in the next release (https://github.com/phantomstudios/use-local-state/blob/master/CHANGELOG.md)
19-
2. discussed previously (https://github.com/phantomstudios/use-local-state/search)
20-
-->
17+
Before posting, please check that the feature hasn't already been discussed previously (https://github.com/phantomstudios/use-local-state/search)
2118
22-
<!--
2319
You can help us add the feature more quickly by:
2420
1. Providing as much detail as possible in this issue
2521

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ npm i @phntms/use-local-state
2626

2727
## Usage
2828

29-
Store a boolean to track if a user has detected terms of use.
29+
Store a boolean to track if a user has accepted terms of use.
3030

3131
```JSX
3232
import React from 'react';
3333
import useLocalState from '@phntms/use-local-state';
3434

35-
const SomeExample = () = {
35+
const TermsExample = () = {
3636
const [accepted, setAccepted] = useLocalState("TERMS_ACCEPTED", false);
3737

3838
return (
@@ -58,12 +58,11 @@ interface Bookmark {
5858
url: string;
5959
}
6060

61-
const SomeExample2 = () = {
61+
const BookmarkExample = () = {
6262
const [bookmarks, setBookmarks] = useLocalState<Bookmark[]>("BOOKMARKS", []);
6363

6464
const addBookmark = (bookmark: Bookmark) => setBookmarks([...bookmarks, bookmark]);
6565

66-
6766
return (
6867
<>
6968
<h1>Bookmarks</h2>
@@ -84,8 +83,8 @@ const SomeExample2 = () = {
8483
8584
### Input
8685
87-
- `key` : Required - The key to store within `LocalStorage`.
88-
- `initialValue` : Required - The default/initial value if the key is not found within the `LocalStorage` object.
86+
- `key` : Required - The key of type `string` to store within `LocalStorage`.
87+
- `initialValue` : Required - The default/initial value of type `T` if the key is not found within the `LocalStorage` object.
8988
9089
### Output
9190

0 commit comments

Comments
 (0)