---
# System prepended metadata

title: react typescript

---

# react typescript

* props
    - we need to declare type for props
    ```javascript=
    type GreetProps={
        name:string,
        age:number,
        logged:boolean,
        fullName:{
            first:string,
            lase:string
        }
    }
    const Greet = (props: GreetProps)
    ```
    - auto complete for object props
    - if we try to pass different type to props will refuse to pass any wrong type to the props
    - types when building applications and  interfaces when build libraries
    - we have to pass props that declared on type object