Write your custom Hook
Use custom hooks for your development, abstract common logic/state used across multiple Components. 
Tags: react, reactnative, hooks, javascript