DEV Community

Discussion on: Returning JSX from hooks

Collapse
 
albencfc profile image
Albenis Kërqeli

I think that putting jsx in usestate is bad practice or anti-pattern and this method should be avoided

Collapse
 
shaaandi profile image
shaaandi

I haven't added the jsx in useState ? Where you get that?

Collapse
 
albencfc profile image
Albenis Kërqeli

You didn't add jsx in usestate hook but you are returning jsx from custom hook , that is bad practice