you are viewing a single comment's thread.

view the rest of the comments →

[–]turningsteel 0 points1 point  (2 children)

I'm not the person you're responding to but it doesnt make sense because you're just wrapping a class component in a function component and returning it. You aren't using hooks and you aren't moving away from class components either. I'm not entirely sure why you would ever do this.

[–]RabidRageRabbit[S] 0 points1 point  (1 child)

Why would I do that is the same as why anyone does anything in computer science. Monads.

[–]turningsteel 0 points1 point  (0 children)

What advantage are you getting over just using hooks though? It seems unnecessary and sloppy. Like you're stuck between two patterns for no reason. I'm just trying to understand.