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
Fixes issue where errors would be swallowed. They now get reported always on node run, and will get reported on browser if no ErrorComponent is specified.
Copy file name to clipboardExpand all lines: README.md
+5-12
Original file line number
Diff line number
Diff line change
@@ -100,11 +100,11 @@ The asynchronous component factory. Config goes in, an asynchronous component co
100
100
-`config` (_Object_) : The configuration object for the async Component. It has the following properties available:
101
101
-`resolve` (_() => Promise<Component>_) : A function that should return a `Promise` that will resolve the Component you wish to be async.
102
102
-`LoadingComponent` (_Component_, Optional, default: `null`) : A Component that will be displayed until your async Component is resolved. All props will be passed to it.
103
-
-`ErrorComponent` (_Component_, Optional, default: `null`) : A Component that will be displayed if any error occurred whilst trying to resolve your component. All props will be passed to it as well as an `error` prop which is an object with a `message` and `stack` property.
103
+
-`ErrorComponent` (_Component_, Optional, default: `null`) : A Component that will be displayed if any error occurred whilst trying to resolve your component. All props will be passed to it as well as an `error` prop containing the `Error`.
104
104
-`name` (_String_, Optional, default: `'AsyncComponent'`) : Use this if you would like to name the created async Component, which helps when firing up the React Dev Tools for example.
105
105
-`autoResolveES2015Default` (_Boolean_, Optional, default: `true`) : Especially useful if you are resolving ES2015 modules. The resolved module will be checked to see if it has a `.default` and if so then the value attached to `.default` will be used. So easy to forget to do that. 😀
106
-
-`serverMode` (_Boolean_, Optional, default: `'render'`) : Only applies for server side rendering applications. Please see the documentation on server side rendering. The following values are allowed.
107
-
-__`'render'`__ - Your asynchronous component will be resolved and rendered on the server. It's children will
106
+
-`serverMode` (_Boolean_, Optional, default: `'resolve'`) : Only applies for server side rendering applications. Please see the documentation on server side rendering. The following values are allowed.
107
+
-__`'resolve'`__ - Your asynchronous component will be resolved and rendered on the server. It's children will
108
108
be checked to see if there are any nested asynchronous component instances, which will then be processed based on the `serverMode` value that was associated with them.
109
109
-__`'defer'`__ - Your asynchronous component will _not_ be rendered on the server, instead deferring rendering to the client/browser.
110
110
-__`'boundary'`__ - Your asynchronous component will be resolved and rendered on the server. However, if it has a nested asynchronous component instance within it's children that component will be ignored and treated as being deferred for rendering in the client/browser instead (it's serverMode will be ignored).
@@ -20,17 +22,17 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
20
22
21
23
function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor: {value: subClass,enumerable: false,writable: true,configurable: true}});if(superClass)Object.setPrototypeOf ? Object.setPrototypeOf(subClass,superClass) : subClass.__proto__=superClass;}
0 commit comments