Skip to content

Releases: dlmr/react-router-redial

v0.3.6

07 Dec 19:03
Compare
Choose a tag to compare

Fixes

  • Solve a bug in onCompleted for afterTransition when using parallel — #22
  • Trigger beforeTransition before afterTransition when in parallel — #22
  • Make sure we don't show a components for a aborted path — #22

v0.3.5

20 Apr 18:50
Compare
Choose a tag to compare

Fixes

  • Adds compatibility with React 15.5 — #19
  • Bumped lodash.isplainobject#20
  • Remove assumption that we always get an error object — #18
  • Fixes a bug in the default onError handler where type was undefined — #17

v0.3.4

02 Dec 22:56
Compare
Choose a tag to compare

Fixes

  • Updates peerDependencies to support React Router ^3.0.0 along with ^2.4.0#15 by @mscienski

v0.3.3

03 Nov 12:01
Compare
Choose a tag to compare

Features

v0.3.2

30 Oct 19:12
Compare
Choose a tag to compare

Fixes

  • Fixes regression from 0.3.0 where afterTransitionLoading were undefined — #12 by @andreasrs

v0.3.1

27 Oct 08:22
Compare
Choose a tag to compare

Fixes

v0.3.0

18 Oct 14:54
Compare
Choose a tag to compare

Breaking

-import { RedialContext } from 'react-router-redial';   
+import { useRedial } from 'react-router-redial';
+import { applyRouterMiddleware } from 'react-router';

 <Router
   history={ browserHistory }
   routes={ routes }
-  render={ (props) => (    
-    <RedialContext     
-      { ...props }     
-      locals={ locals }        
-      blocking={ ['fetch'] }       
-      defer={ ['defer', 'done' ] }     
-      parallel={ true }        
-      initialLoading={ () => <div>Loading…</div> }
-    />
+  render={ applyRouterMiddleware(
+    useRedial({
+        locals,
+        beforeTransition: ['fetch'],
+        afterTransition: ['defer', 'done'],
+        parallel: true,
+        initialLoading: () => <div>Loading…</div>,
+    })
   )}
 />
  • Renamed and updated parts of the client API to make more sense — #7
deferredLoading => afterTransitionLoading
blocking => beforeTransition
defer => afterTransition

Features

  • Updated peerDependency to allow the latest version of [email protected]#8
  • Added more data to the lifecycle functions — #7
onError(error, metaData)
onAborted(becauseError)
onCompleted(type) 

Now possible to do some nifty error handling using this.

See the documentation for complete information about them.

v0.2.3

30 May 11:11
Compare
Choose a tag to compare

Features

v0.2.2

29 May 15:23
Compare
Choose a tag to compare

Features

  • Better support for aborting redial hooks and detecting of it has been aborted. isAborted()
  • Function for manually abort redial hooks. abort()
  • Lifecycle functions, see below.
onStarted(force)      Invoked when a route transition has been detected and when redial hooks will be invoked
onError(error, type)  Invoked when an error happens, type can be either a "location-change", "aborted" or "other" reason
onAborted             Invoked if it was prematurely aborted through manual interaction
onCompleted           Invoked if everything was completed successfully, both blocking and deferred

Fixes

  • Inconstancy when using force together with parallel set to false.

v0.2.1

24 May 11:36
Compare
Choose a tag to compare

Fixes

  • Solves a bug that resulted in an error in IE9.