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
使用版本 1.1.4
hox使用 createModal 创建实例,但是没有销毁方法,在 modal 里使用副作用例如监听dom元素没有办法在最后销毁。
建议增加一个销毁方法以便触发 unmount
如果没有别的办法,可以考虑在 render (Executor 的时候多套一层根节点,销毁的时候把数据节点从根节点上移除就能触发 unmount
hox/src/create-model.tsx
Line 7 in 7f3d67c
export function createModel<T, P>(hook: ModelHook<T, P>, hookArg?: P) { const container = new Container(hook); render( <Executor onUpdate={val => { container.data = val; container.notify(); }} hook={() => hook(hookArg)} /> ); // ...... }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
使用版本 1.1.4
hox使用 createModal 创建实例,但是没有销毁方法,在 modal 里使用副作用例如监听dom元素没有办法在最后销毁。
建议增加一个销毁方法以便触发 unmount
如果没有别的办法,可以考虑在 render (Executor 的时候多套一层根节点,销毁的时候把数据节点从根节点上移除就能触发 unmount
hox/src/create-model.tsx
Line 7 in 7f3d67c
The text was updated successfully, but these errors were encountered: