InterviewSolution
| 1. |
What Are Components In Reactjs? |
|
Answer» React encourages the idea of reusable COMPONENTS. They are widgets or other parts of a layout (a FORM, a button, or anything that can be marked up using HTML) that you can reuse multiple times in your web application. ReactJS enables us to create components by invoking the React.createClass() method features a render() method which is responsible for displaying the HTML code. When designing interfaces, we have to break down the INDIVIDUAL design elements (buttons, form fields, layout components, etc.) into reusable components with well-defined interfaces. That way, the next time we need to build some UI, we can write much less code. This means faster development time, FEWER bugs, and fewer bytes down the wire. React encourages the idea of reusable components. They are widgets or other parts of a layout (a form, a button, or anything that can be marked up using HTML) that you can reuse multiple times in your web application. ReactJS enables us to create components by invoking the React.createClass() method features a render() method which is responsible for displaying the HTML code. When designing interfaces, we have to break down the individual design elements (buttons, form fields, layout components, etc.) into reusable components with well-defined interfaces. That way, the next time we need to build some UI, we can write much less code. This means faster development time, fewer bugs, and fewer bytes down the wire. |
|