I'm Drew Town a web developer and systems engineer in Colorado. Always learning, traveling and exploring. Sharing updates, trials and tribulations in tech and life.
Component names should be multi-worded to help avoid conflicts with current and future HTML elements. Your examples are but it isn't stated anywhere. Obviously, you wouldn't use <button> but you should also not use <modal> in case that makes it into the HTML spec some day.
I waffle a lot about whether or not to pass full objects as props. On the one hand it is very convenient on the other hand it is less explicit about what the child is expecting to use.
I've had trouble understanding code bases where complex object structures are passed as props, I really think it's about losing less time on refactoring & having newcomers grasp a prop's role faster.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Component names should be multi-worded to help avoid conflicts with current and future HTML elements. Your examples are but it isn't stated anywhere. Obviously, you wouldn't use
<button>
but you should also not use<modal>
in case that makes it into the HTML spec some day.I waffle a lot about whether or not to pass full objects as props. On the one hand it is very convenient on the other hand it is less explicit about what the child is expecting to use.
I wholeheartedly agree Drew.
I've had trouble understanding code bases where complex object structures are passed as props, I really think it's about losing less time on refactoring & having newcomers grasp a prop's role faster.