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

state为函数时,useBlockState的返回值有误 #46

Closed
run-nan opened this issue Feb 22, 2023 · 0 comments
Closed

state为函数时,useBlockState的返回值有误 #46

run-nan opened this issue Feb 22, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@run-nan
Copy link
Collaborator

run-nan commented Feb 22, 2023

当state的值为函数时

registerBlock(block).initState({
    func: () => 'this is the return value'
})

useBlockState的返回值有误

const func = useBlockState(block, state => state.func)
// func成了函数的返回值this is the return value'
@run-nan run-nan added the bug Something isn't working label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant