Jenn Creighton Chats With Kent About Avoiding An "Apropcolypse"

29:47
 
Paylaş
 

Manage episode 247100221 series 2530175
Kent C. Dodds tarafından hazırlanmış olup, Player FM ve topluluğumuz tarafından keşfedilmiştir. Telif hakkı Player FM'e değil, yayıncıya ait olup; yayın direkt olarak onların sunucularından gelmektedir. Abone Ol'a basarak Player FM'den takip edebilir ya da URL'yi diğer podcast uygulamalarına kopyalarak devam edebilirsiniz.

Jenn has been working with React since 0.13. She has a background in creative writing, and it melded well with React.

One of her big early mistakes with React was focusing too hard on making components reusable. When you try to make your component one-hundred percent reusable, you end up with a massive stack of props. In our effort to make things reusable, we end up making it harder for ourselves and others.

Sometimes it even makes sense to duplicate the component, change its name, and add your changes to it instead of adding more props to the existing component. Too many props on your component not only makes it hard to refactor but also difficult to even use.

One of Jenn's rules for her codebase is that new engineers should be able to come in and get up to speed quickly. It is an overall rule that has to do with keeping the codebase consistent. Jenn puts rules in place like, "We consistently use this state management library." So if a person comes in, they aren't finding multiple ways of doing the same thing.


Homework

  • Document it before you write your next component!

Resources

Guest: Jenn Creighton

Host: Kent C. Dodds

63 bölüm