Closed ianobermiller closed 10 months ago
hi @ianobermiller, I'm sorry if I only replied now because I hadn't seen the pr :/
How about changing it like this?
export const RelayEnvironmentProvider = function <TEnvironment extends IEnvironment = Environment>(props: {
So the extends is the only thing that changes, this should solve your problem too.
Yes, that would work, but the generic isn't necessary since there are no other props using it.
released with relay-hooks v9.0.0
RelayEnvironmentProvider
current accepts only the typeEnvironment
, which is actually the default export, orRelayModernEnvironment
. Because of some funny naming byrelay-runtime
, we actually want "any environment", which isIEnvironment
. This allows us to pass in a mock environment as opposed to a fully-fledgedRelayModernEnvironment
.I also converted the component to a function for consistency and removed the generic since it isn't necessary.