Using React context with a custom hook