Home > Mobile >  Use class reference for state in useState hook
Use class reference for state in useState hook

Time:02-20

I'd like to store a reference to a class in state but an error occurs.

Specifically, the following:


useState(SomeClass)

results in:

 Class constructor SomeClass cannot be invoked without 'new'

  • Related