Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions patches/@docusaurus__react-loadable.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/lib/index.js b/lib/index.js
index 1167aa26f6ad3cbacde07230386a54270e0bcdb9..47b6c3d299434cff99768c8862f365e6e2e12cdd 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -134,10 +134,10 @@ function createLoadableComponent(loadFn, options) {
function (_React$Component) {
_inheritsLoose(LoadableComponent, _React$Component);

- function LoadableComponent(props) {
+ function LoadableComponent(props, context) {
var _this;

- _this = _React$Component.call(this, props) || this;
+ _this = _React$Component.call(this, props, context) || this;

_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "retry", function () {
_this.setState({
@@ -159,6 +159,9 @@ function createLoadableComponent(loadFn, options) {
loading: res.loading,
loaded: res.loaded
};
+
+ this._loadModule();
+
return _this;
}

@@ -168,10 +171,6 @@ function createLoadableComponent(loadFn, options) {

var _proto = LoadableComponent.prototype;

- _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {
- this._loadModule();
- };
-
_proto.componentDidMount = function componentDidMount() {
this._mounted = true;
};
31 changes: 17 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ allowBuilds:
fast-folder-size: false
nx: false
sharp: false
patchedDependencies:
'@docusaurus/react-loadable': patches/@docusaurus__react-loadable.patch
Loading