Question: I want to declare default props in a functional component 

normally we would do this

```js
function Body() {
    static defaultProps = {
        counter: 0
    }
    return (
        <div>
            body
        </div>
    );
}

```

this obviously doesn't work

Answer: 
This is usually called a functional component, not a hook component. 

For the `defaultProps` you can do it like this:

```
const Body = ({ counter }) => {
    return (
        <div>
            {counter}
        </div>
    );
}

Body.defaultProps = {
    counter: 0
}

```
You can do that simply like this

```
const Body = (props) => {
    const {foo = 'defaultValue'} = props;

    return <div>{foo}</div> // It will show defaultValue if props foo is undefined
}

```