green6060/digicert-public-library-demo

typescript function

Opened this issue · 0 comments

You declare this file as typescript, but it has nothing to stay the component is typesafe. There is a debate out there about defining this as a React.FunctionComponent. I know we use it at my work and have never had any problems for the reason people don't use it. My suggestion would be to use it. const App:React.FC = () => {...} there is a generic branched off of FC that i'm sure i'll comment about later.

Second question here. Why is your file called App. What's your project supposed to be doing? App is so super generic and doesn't define what your component is. Yes this is "the entry point into the main react application", except it isn't as there's a file before this one that then adds this component. Rename this to what your project is, rename your classNames to match descriptive instead of "App"