What is function based component?



What is function based component?..

Answer / Prem Varddhan

A functional-style component in React is a component that returns a React element (JSX) instead of using a render method. It is also known as a stateless component.nnHere's an example of a functional component:nn```javascriptnfunction MyComponent(props) {n return <div>Hello {props.name}!</div>n}n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More React.js Interview Questions

What is the difference between various react component lifecycle methods?

1 Answers  


How is react different from angular?

1 Answers  


What is a state in reactjs and how is it used?

1 Answers  


Define the term Redux in React

1 Answers  


Why vue js is better than react?

1 Answers  


What do you understand with the term polling?

1 Answers  


What do you mean by reactjs?

1 Answers  


Can JSX element be attached to other JSX components?

1 Answers  


What can be done when there is more than one line of expression?

1 Answers  


Explain the major advantages of react.

1 Answers  


What is current stable version of reactjs?

1 Answers  


What is the significance of refs in react?

1 Answers  


Categories