Closed ysgk closed 4 years ago
This seams totally overkill, why are you not just exporting base
?
export base = "https://my-api.com"
And you are good to go!
If you want something more fancy to deal with you config, I can also suggest https://github.com/contiamo/react-runtime-config 😇 My little homemade solution, works very smoothly 😃
OK, I'll look into it. Thanks.
Is your feature request related to a problem? Please describe. I want to create a custom hook that uses
base
value passed to the Context, but currently there is no such functionality provided.For example:
Describe the solution you'd like It would be nice if restful-react could provide such a hook or export the Context itself.
Describe alternatives you've considered There seems no alternative unless the Context is exported.