Hello!, Great article, thanks for sharing
I am also investigating these matters nowadays and recently discovered that if you have
class Foo extend Component { constructor(props){ super(props) this.state = { foo: 1 } } //...
And you are:
then, you can do:
class Foo extend Component { state = { foo: 1 } //...
and it works the same.
I hope it helps.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hello!, Great article, thanks for sharing
I am also investigating these matters nowadays and recently discovered that if you have
And you are:
then, you can do:
and it works the same.
I hope it helps.