Basically in class components we pre initialise state in constructor with initial values like below.
constructor(props){
super(props);
this.state = {
count: 0
}
}
But after hooks are introduced all the class components became functional components with state.
But my query is how can I pre initialise count state to 0 with hooks in React v16.7.0