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
如何复现 ---描述一下问题 业务场景中使用了mobx后导致Field内部调用setState无法触发render函数更新。
mobx
Field
setState
render
复现源码:
import React from 'react'; import { Field } from 'cloud-react'; import { observer } from 'mobx-react'; @observer export default class DEMO extends React.Component { field = new Field(this) onUpdate = () => { this.field.setValue('test', '我更新了'); } render() { return ( <> <input {...this.field.init('test')} /> <button onClick={this.onUpdate}>更新</button> </> ); } }
期望的结果 点击更新按钮后输入框中内容变成我更新了
我更新了
截图 无
使用环境 无
The text was updated successfully, but these errors were encountered:
No branches or pull requests
如何复现
---描述一下问题
业务场景中使用了
mobx
后导致Field
内部调用setState
无法触发render
函数更新。复现源码:
期望的结果
点击更新按钮后输入框中内容变成
我更新了
截图
无
使用环境
无
The text was updated successfully, but these errors were encountered: