I have the following component:
const App = () => {
const registerPushNotificationsToken = () => {
...
};
useEffect(() => {
registerPushNotificationsToken();
}, []);
return <></>
}
How can I move the function and the useEffect to other file? Should I use a hook or a HOC?