adspace


What are stateless components in reactjs?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use events in reactjs? Give an example of using events?

558


How would you create higher order components (hocs) in react.js?

446