0% found this document useful (0 votes)
50 views4 pages

REACT - JS Cheatsheet For Better Learning ?

Uploaded by

Oumaima Souguir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
50 views4 pages

REACT - JS Cheatsheet For Better Learning ?

Uploaded by

Oumaima Souguir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
* If you want to Master JavaScript, Checkout my new eBook. Steal this REACT Cheatsheet Components + A’building block of React applications. * Can be either a class or a function. ¢ Responsible for rendering a part of the UI. ISX + Asyntax Ceacariielahce) JavaScript that IMAReR onic) HTML-like code in our JavaScript. + Used to describe the Ul of our React components. + JSX elements are transformed into JavaScript function calls and then into HTML elements by React. Boh c-y + An object that holds data that can change over time. * Managed within a component ‘and can only be updated’ using the setState() method. + Changing the state of a component will trigger a re-render - of that component. Props + Short for “properties”. + An object that is passed from a parent component to a child component. + Used to customize the behaviour and appearance of a component. * Props are read-only and should not be modified directly. LB tore (a vu telo ly + Methods that are invoked at different stages of a component's life cycle. > componentDidMount(): Invoked once the component has been mounted (i.e., added to the DOM). Pee Ty Tarun ear aol cred Ucimeticelt malt component is unmounted and removed from the DOM. * + shouldComponentUpdate(): Invoked before a component is re-rendered to determine if it should update. bay « USed to handle user interactions with a component. + Defined using onEventName attributes (e.g., onClick, onSubmit). + Can be handled using class methods or arrow functions. ry ; : + Away to reference a DOM element or component instance. * Created using the React.createRef() method. + Useful for accessing the properties and methods of a component or DOM element. atte c) + Away to add state and other React features to functional components. * Introduced in React 16.8. Peas colanve) (ccm ty cone MES -)agi teas UT -Loredanc a) useReducer(), useMemo(), useCallback(), useRef()

You might also like