DEV Community

Discussion on: Why i won't use React Hooks

Collapse
 
abhijitparida profile image
Abhijit Parida

That's why i never mess React Component with side-effects, like ajax request or state.

How do you do it then?

Collapse
 
revskill10 profile image
Truong Hoang Dung

You can use a HOC (Higher order component) to reuse behaviour, or using Render Props pattern.

Collapse
 
abhijitparida profile image
Abhijit Parida

Like redux?

Thread Thread
 
revskill10 profile image
Truong Hoang Dung

No need for redux.
You can read more about HOC and render props in ReactJS guide.

Thread Thread
 
abhijitparida profile image
Abhijit Parida

Alright. Thank you!