I have started to learn TypeScript with React and have refactored some of my components to TypeScript-components. I have a function that loks like this:
import { withOrientationChange } from 'react-device-detect';
function wheel({ isLandscape }: { isLandscape: boolean }): JSX.Element {
// Some code
}
export default withOrientationChange(wheel);
Since I want named exports I usually just do:
import { withOrientationChange } from 'react-device-detect';
export function wheel({ isLandscape }: { isLandscape: boolean }): JSX.Element {
// Some code
}
How do I do this with a Higher Order Component - like the withOrientationChange that I use - from react-device?