Photogallery useFileSystem

I’m trying to learn by doing and following the instructions for the PhotoGallery example but a soon as I try to **useFilesystem()** I get

Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

I did check React versions to make sure that’s not the problem. I commented out the rest of the system code and isolated it to the useFileSystem call at this stage of the demo https://ionicframework.com/docs/react/your-first-app/3-saving-photos

Suggestions?