Writing "Testable" React Components
Hey friends this is another answer to that lengthy email from Poeter I'm
not sure how to say that but properly sorry but the question is how do you
write code that can be easily tested and they go at length to explain, you
know, sometimes you write, you know smaller functions and we can test those
easier but ultimately like, it doesn't always work that way components
typically grow and splitting them up makes it feel harder to maintain and I
totally agree with that.
I have a blog post called when to break up a react component.And I
typically preferred don't break it up if you can help it avoid breaking up
your components unnecessarily so yeah, so I prefer having bigger components
but then like okay, so how do I test this it's got a bunch of use effects
and whatever else in it and then they also bring up the container or yeah
the like the smart and dumb components sort of thing or whatever we landed
on for the macular for that but I actually never liked that pattern either.
I didn't thi
Comments