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: 
```js
function Body({counter=0}) {
    return (
        <div>
            body
        </div>
    );
}

```

counter now has initial value of 0
Hooks are just regular functions, you can define default values the same way as you define them in regular functions

```
function useNameHook(initialName = "Asaf") {
  const [name, setName] = useState(initialName);

  // you can return here whatever you want, just the name,
  // just the setter or both
  return name;
}

function Comp({ name }) {
  const myName = useNameHook(name);

  return <h1>Hello {myName}</h1>;
}

function App() {
  return (
    <div className="App">
      {/* without name prop */}
      <Comp />
      {/* with name prop */}
      <Comp name="angry kiwi" />
    </div>
  );
}

```