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

feat: add HashPersist #68

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

feat: add HashPersist #68

wants to merge 9 commits into from

Conversation

daybrush
Copy link
Member

@daybrush daybrush commented Apr 6, 2022

#67

Copy link
Contributor

@qpitlove qpitlove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@WoodNeck WoodNeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -0,0 +1,57 @@
/* eslint-disable class-methods-use-this */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All files are missing the license notification, could you please add it?

class HashPersist extends Persist {
/**
* Read value
* @param {String?} path target path
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether this was intentional, but shouldn't this be just string type? (required?)

Copy link

@malangfox malangfox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@qpitlove qpitlove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -338,7 +338,7 @@ export function clear() {
PersistHistory.hash = null;
}

export function useHashPersist() {
export function registerHashPersist() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using registerHashPersistOnce ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants