diff --git a/package.json b/package.json index ce6790f..b141c80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-loadable-visibility", - "version": "2.1.1", + "version": "2.2.0", "description": "A wrapper around react-loadable for elements that are visible on the page", "main": "lib/index.js", "repository": "https://github.com/stratiformltd/react-loadable-visibility", diff --git a/src/createLoadableVisibilityComponent.js b/src/createLoadableVisibilityComponent.js index 37b319a..200cb9e 100644 --- a/src/createLoadableVisibilityComponent.js +++ b/src/createLoadableVisibilityComponent.js @@ -87,14 +87,14 @@ function createLoadableVisibilityComponent (args, { } if (LoadingComponent) { - return + return {React.createElement(LoadingComponent, { isLoading: true, })} } - return + return } } }