Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for the new API of useSessionStorageValue and useLocalStorageValue #970

Merged

Conversation

ArttuOll
Copy link
Contributor

@ArttuOll ArttuOll commented Oct 19, 2022

What is the problem?

The API of useStorageValue has changed. The changes need to be reflected in the documentation of useSessionStorageValue and useLocalStorageValue.

What changes does this PR make to fix the problem?

Modify the relevant pieces of the docs. Please make sure that I did not miss anything.

Also, do the current examples seem a bit weird to you? They don't really persist the values the user types into the inputs and you cannot see anything come up in storages. But I guess that is because the example is in an iframe (but don't the iframe and the docs page come from the same domain? Then the iframe should be able to access the parent's storages).

Relates to #960

@xobotyi
Copy link
Contributor

xobotyi commented Oct 22, 2022

Maybe you;ve been watching session storages that should not persist? because iframe is destructed after the reload and tehrefore session is over.
Wheras local storage persists
image

@xobotyi
Copy link
Contributor

xobotyi commented Oct 22, 2022

Also i've been hoping you'll updatye my PR 🙃
Ill have to merge two PR's to avoid issues with auto-release

@ArttuOll
Copy link
Contributor Author

Oh, I see. Well, I can push this to your PR-branch as well.

@xobotyi
Copy link
Contributor

xobotyi commented Oct 22, 2022

All do it myself now, also tehre are some issues with description, that ill fix

@xobotyi
Copy link
Contributor

xobotyi commented Oct 22, 2022

Oor you can do it, just realized that you've made it from fork.

(as you are a member of a team you're now allowed to work straight on this repo)

@ArttuOll
Copy link
Contributor Author

ArttuOll commented Oct 22, 2022

It appears I am unable to push the commits to your PR-branch, even though I am working directly in this repo. I am getting a 403 from GitHub.

remote: Permission to react-hookz/web.git denied to ArttuOll.
fatal: unable to access 'https://github.com/react-hookz/web.git/': The requested URL returned error: 403

@xobotyi
Copy link
Contributor

xobotyi commented Oct 22, 2022

maybe it is somehow related to fact that im using ssh instead http.. dunno

@ArttuOll
Copy link
Contributor Author

In fact, it seems that I'm not even able to push new branches to this repo. Maybe I don't have the required rights this organization?

@xobotyi xobotyi merged commit 6a17640 into react-hookz:rework-useStorageValue Oct 22, 2022
@xobotyi
Copy link
Contributor

xobotyi commented Oct 22, 2022

You right, there was an issue with permissions for team members.

Now it should be ok

@ArttuOll ArttuOll deleted the rework-useStorageValue branch October 22, 2022 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants