Thanks a lot for creating such a list of questions to help us prepare for the interview.
But for the number 10 in reactjs-interview-questions
Props are inputs to components. They are single values or objects containing a set of values that are passed to components on creation using a naming convention similar to HTML-tag attributes. They are data passed down from a parent component to a child component.
After some checking, I find out that React prop naming convention is generally camelCase. But there is no finite answer for HTML-tag Attributes naming convention. Some are using kebab-case, and some are using snake_cases. Would it be better if we can change this line so it is clear when talking about name convention?
But generally, it doesn't matter, since naming is usually a habit and doesn't effect coding that much.
Also if I am making any mistake, feel free to let me know.
Hello Dear Sudheerj,
Thanks a lot for creating such a list of questions to help us prepare for the interview.
But for the number 10 in reactjs-interview-questions
Props are inputs to components. They are single values or objects containing a set of values that are passed to components on creation using a naming convention similar to HTML-tag attributes. They are data passed down from a parent component to a child component.
After some checking, I find out that React prop naming convention is generally camelCase. But there is no finite answer for HTML-tag Attributes naming convention. Some are using kebab-case, and some are using snake_cases. Would it be better if we can change this line so it is clear when talking about name convention?But generally, it doesn't matter, since naming is usually a habit and doesn't effect coding that much.
Also if I am making any mistake, feel free to let me know.
Sincerely, BrockDW