▲ | parpfish 5 days ago | |
> No one would write a class when we’re using a functional approach everywhere. do people really think functional coding shouldn't involve writing classes? i can't imagine writing what i think of as code in a "functional programming style" without tons of dataclasses to describe different immutable records that get passed around. and if you're feeling fancy, add some custom constructors to those dataclasses for easy type conversions. | ||
▲ | williamstein 5 days ago | parent | next [-] | |
In the context of react codebases, people typically use either functional components everywhere or class components. Mixing the two approaches is frustrating and painful, eg you can’t use any of the hooks in your codebase in a class component. Perhaps the OP was talking about this, but just being really vague. | ||
▲ | bublyboi 5 days ago | parent | prev [-] | |
I think he’s referring to classes vs functions in React |