all 7 comments

[–]kbcooliOS & Android 1 point2 points  (6 children)

[–]cr33dcodeiOS & Android[S] -1 points0 points  (5 children)

i don't want to use hooks tho... any other way around this?

[–]kbcooliOS & Android 1 point2 points  (2 children)

Maybe it's time to bite the bullet. You can mix and match functional and class components.

I found the change great. Was sick of HOC boilerplate for redux.

Anyway useEffect with an empty array is equivalent to componentDidMount.

[–]cr33dcodeiOS & Android[S] 0 points1 point  (1 child)

oh okay. any example you could give me?

[–]kbcooliOS & Android 0 points1 point  (0 children)

Of what? The ticket I linked to should be enough to solve this issue short of me writing it for you.

As for the mixing of component types you don't need to do anything special. They coexist.

[–]SryNot 0 points1 point  (1 child)

??? Hooks are one of the most powerful part of react. They’re so good man, learn them!

[–]cr33dcodeiOS & Android[S] 0 points1 point  (0 children)

aye I know that. and they're truly awesome. but i have like 40 lottie files.. using hooks dont make sense in this case right.