File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,14 @@ function PolyMiddlewareComposer(props: PolyMiddlewareComposerProps) {
3434
3535 const activityPolyMiddleware = useMemo ( ( ) => extractActivityPolyMiddleware ( middleware ) , [ middleware ] ) ;
3636
37+ // Didn't thoroughly think through this part yet, but I am using the first approach for now:
38+
39+ // 1. <XXXProvider> for every type of middleware
40+ // - If props.middleware changed and only one middleware changed, we could cache other middleware types
41+ // 2. Single <Provider>
42+ // - useBuildRenderCallback should pre-build (apply) the callback (multiple middleware -> single enhancer)
43+ // - The callback will be invalidated on middleware (of target type) change
44+
3745 return (
3846 < ActivityPolyMiddlewareProvider middleware = { activityPolyMiddleware } > { children } </ ActivityPolyMiddlewareProvider >
3947 ) ;
You can’t perform that action at this time.
0 commit comments