You can have state in a function component, that is what Hooks are for.
You have to choose what type of component you want. You don’t have to use classes, and you don’t have to use Hooks. You can have a mix of both in the application (not at the same time, in the same component obviously).
Can you post a link to your code on something like codesandbox?