Skip to content

Commit

Permalink
doc: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 27, 2021
1 parent ce6ff9f commit ce25bdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function Demo() {
const [data, setData] = useState({
email: 'kennyiseeyou@gmail.com'
});
const [, forceUpdate] = useState();
const [upState, forceUpdate] = useState(0);

useEffect(() => {
if (!validator.current.initValues) {
Expand All @@ -56,7 +56,7 @@ function Demo() {
function handleSubmit(evn) {
evn && evn.preventDefault();
validator.current.showMessages();
forceUpdate(1);
forceUpdate(upState + 1);
}

function handleReset() {
Expand Down

0 comments on commit ce25bdb

Please sign in to comment.