---
# System prepended metadata

title: React Questions

---

# React Questions

- What are components?
- What are props?
- Which syntax is correct?
`MyComponent(prop1 = "John")`
`new MyComponent(prop1 = "John")`
`< MyComponentprop1 = "John">`

Given the component:
```
class MyComponent extends Component {
    constructor(props){
        
    }
    
    {/*some logic*/}

    render() {
        return (
            <></>
        )
    }
}

export default MyComponent
```
- A developer needs to have access to props inside the constructor. What is the syntax?


---

## Key Definitions

**State**: built-in React object that is used to contain data or information about the component

**setState**():  Built in react function to set state values