I am not understand, first time leraning react javascript

can you help me?
i not understand with this content, can you explain this?

> Blockquote

Blockquote

. thank you!

regard
Ringga

Class components and react components in general have access to their own “props” object. Which includes any data passed to them(like passing parameters to a function, but this time around, you pass them when you put the component and its attributes <MyComponent someAttr={data you pass}>). Within the component body you can access that object and value in it, like you would do regularly, props.propName. The difference with ES6 class components is, they work slighlty different and its their constructor function which takes the props object and to access it, you must put the keyword this in front. In this context, the this refers to the component itself. Its like telling ‘look into this component props object and give me the value of the said property/attribute’, or in code language- this.props.attrName.

hmm, i will try
anw thank you for your advice

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.