DEV Community

Discussion on: An Introduction to Reusable Components and how to create Typography Component

 
nghiemthu profile image
Thu Nghiem

yeah good points. it will return undefined and error in that case :) good catch. usually, it will have propTypes or typescript to prevent those. but yeah we can add more check to this. But this is an example and the component is not fully complete.