Framework7 with React Hooks

Hi guys. I have a doubt. React 16.8 added the ability to use code-cleansing and simplifying Hooks, no longer requiring class specification. The question is: can I use React Hooks together with Framework7?

Yes, should be fine with hooks


How can I access the app instance when using the hooks?

Oh, sorry, I haven’t noticed this section:

Framework7 instance, f7ready method and theme can be imported directly from Framework7-React library. Device, Request and Support can be imported directly from Framework7 core library.

import { Device, Request, Support } from 'framework7';
import { f7, f7ready, theme } from 'framework7-react';

Works great! Thank you, Vladimir!

1 Like