You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an app that uses the prefetch decorator, from redial's previous life as react-fetcher, thirty-plus times. I'd like to upgrade to redial for the ability to attach arbitrary lifecycle hooks even to stateless components, but I'm not looking forward to what promises to be a tedious migration... Has anyone written code to ease the migration or to continue supporting the old prefetch and defer decorators with the new version?
The text was updated successfully, but these errors were encountered:
levity
changed the title
Easing migration?
Easing migration from react-fetcher?
Feb 27, 2016
The migration is fairly simple, basically all you need to do is to switch the names. The main difference is rather than use defer and prefetch directly their argument just gets passed to either the fetch or defer key in the provideHooks object.
very light examples:
//beforeprefetch(/* function that dispatches goes here */);defer(/* function that dispatches goes here */);//afterprovideHooks({fetch: /* function that dispatches goes here */,defer: /* function that dispatches goes here */,});
I have an app that uses the
prefetch
decorator, from redial's previous life as react-fetcher, thirty-plus times. I'd like to upgrade to redial for the ability to attach arbitrary lifecycle hooks even to stateless components, but I'm not looking forward to what promises to be a tedious migration... Has anyone written code to ease the migration or to continue supporting the oldprefetch
anddefer
decorators with the new version?The text was updated successfully, but these errors were encountered: