million: Not able to use UseState inside the block

What version of million are you using?

2.6.0-beta.13

Are you using an SSR adapter? If so, which one?

NO

What package manager are you using?

yarn

What operating system are you using?

Windows

What browser are you using?

Chrome

Describe the Bug

While using block component

const Block=block(MyComp)

I am getting error “Invalid hook call. Hooks can only be called inside of the body of a function component”

I am using useState hooks inside the component.

What’s the expected result?

The block should work without the above issue

Link to Minimal Reproducible Example

n/a

Participation

  • I am willing to submit a pull request for this issue.

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

Agreed, @kdRanaa can we have a minimal reproduction that you’re facing?