I am trying to run a class using a button but I can't make it work. I know that if I want to run a class I just need to use:
<className />
So, I tried to do this:
<Button
title="Right button"
onPress={() => <className />}
/>
However, I got an error so I'm probably doing something wrong. Can anyone help?
"Running a class" doesn't really mean anything, so I'm going to have a stab at what you mean. Probably you want to render a class component when you click a button. In that case use something like:
Note this isn't complete - you probably want to also be able to hide it and so on, but it's a start.