File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -229,16 +229,13 @@ export function useEffectEvent<Args, F: (...Array<Args>) => mixed>(
229229 return dispatcher . useEffectEvent ( callback ) ;
230230}
231231
232- export function useResourceEffect (
232+ function experimental_useResourceEffect (
233233 create : ( ) = > mixed ,
234234 createDeps : Array < mixed > | void | null ,
235235 update : ( ( resource : mixed ) => void ) | void ,
236236 updateDeps : Array < mixed > | void | null ,
237237 destroy : ( ( resource : mixed ) => void ) | void ,
238238) : void {
239- if ( ! enableUseResourceEffectHook ) {
240- throw new Error ( 'Not implemented.' ) ;
241- }
242239 const dispatcher = resolveDispatcher ( ) ;
243240 // $FlowFixMe[not-a-function] This is unstable, thus optional
244241 return dispatcher . useResourceEffect (
@@ -249,6 +246,8 @@ export function useResourceEffect(
249246 destroy ,
250247 ) ;
251248}
249+ export const useResourceEffect : typeof experimental_useResourceEffect | null =
250+ enableUseResourceEffectHook ? experimental_useResourceEffect : null ;
252251
253252export function useOptimistic < S , A > (
254253 passthrough : S ,
You can’t perform that action at this time.
0 commit comments