We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在两个View,都使用同样的key。
看了代码,发现ahooks的实现,没有监听了全局的StorageEvent。
目前暂时改用另一个包usehooks-ts,这个包监听全局localStorage修改的事件。
const View1 = ()=>{ const [state, setState] = useLocalSorageState('mykey') return (<Button onClick={()=>{setState('AAA')}}><Button>) } const View2 = ()=>{ const [state, setState] = useLocalSorageState('mykey') console.log(state) }
The text was updated successfully, but these errors were encountered:
在处理了:#2298 耐心等待合并哈
Sorry, something went wrong.
storage
Successfully merging a pull request may close this issue.
在两个View,都使用同样的key。
看了代码,发现ahooks的实现,没有监听了全局的StorageEvent。
目前暂时改用另一个包usehooks-ts,这个包监听全局localStorage修改的事件。
The text was updated successfully, but these errors were encountered: