What are stateless components in reactjs?



What are stateless components in reactjs?..

Answer / Kumar Gaurav Sagar

{"Stateless components": "Stateless components, also known as functional components, are React components that only contain a function and do not have their own state. They are created using ES6 arrow functions or plain JavaScript functions.nnExample: function Welcome(props) {n return <h1>Hello, {props.name}!</h1>;n}"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More React.js Interview Questions

What is the purpose of callback function as an argument of setstate()?

1 Answers  


What is Redux Thunk used for?

1 Answers  


What do you understand by virtual dom? Explain its working.

1 Answers  


When would you use setstate() and forceupdate()?

1 Answers  


Why reactjs is used?

1 Answers  


What is the main goal of react fiber?

1 Answers  


Explain lifecycle of a react component?

1 Answers  


Can a developer create animations in React?

1 Answers  


How to use https instead of http in create-react-app?

1 Answers  


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

1 Answers  


What are the life cycle of reactjs?

1 Answers  


How can we do server-side rendering in React?

1 Answers  


Categories