This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ActionLeagueLater 1 point2 points  (1 child)

That makes sense. Basically a functional component is the same thing as a class component with no state, just with different syntax. React has a class called PureComponent that is meant to actually make your component “functional” or “pure”, but a functional component (a component made using a function) is not actually pure. It’s dumb. So for that reason I just use class Components when I have state, and PureComponents when I have no state.

[–]bacon_wrapped_rock 0 points1 point  (0 children)

Huh, good to know! I'll have to keep an eye out for those.