SyntaxFix
Write A Post
Hire A Developer
Questions
You can simply define the useState like that:
const [, forceUpdate] = React.useState(0);
And usage: forceUpdate(n => !n)
forceUpdate(n => !n)
Hope this help !