how to convert class based componentd to functional components code example
Example: convert app function to class component react native
const App = () => (
<div>
<p>
test
</p>
</div>
);
// to convert the above to a class component:
class App extends Component {
render() {
return (
<div>
<p>
test
</p>
</div>
);
}
}