The question is simple. I just want to create a class in function component. Declare the variable inside that class and use it in function component.
For Example here is my app.js.
const App = () => { const [count, setCount] = useState(0); const increaseCount = () => { setCount(count+1) } return (<View><Pressable onPress={() => {increaseCount()}} ><Text>Increase</Text></Pressable><Text>{count}</Text></View> )}
I just want the same functionality with class.I repeat with CLASS not CLASS COMPONENT.
Please anyone help me with this!!