@microzord/react 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.esm.js +9 -1
  2. package/package.json +3 -3
package/index.esm.js CHANGED
@@ -33,6 +33,14 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
33
33
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
34
34
  };
35
35
 
36
+ const requestIdle = window.requestIdleCallback || function (cb) {
37
+ return setTimeout(() => {
38
+ cb({
39
+ didTimeout: false,
40
+ timeRemaining: () => 0
41
+ });
42
+ }, 0);
43
+ };
36
44
  function createApp(name, element) {
37
45
  class ReactApplication extends Application {
38
46
  bootstrap(container, props) {
@@ -47,7 +55,7 @@ function createApp(name, element) {
47
55
  yield _super.bootstrap.call(this, container, props);
48
56
  this.root.render(element);
49
57
  // https://github.com/reactwg/react-18/discussions/5#discussioncomment-796012
50
- requestIdleCallback(() => {
58
+ requestIdle(() => {
51
59
  this.emitHook(MicrozordLifecycleEvent.bootstrapped());
52
60
  });
53
61
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microzord/react",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "keywords": [
5
5
  "microfrontends",
6
6
  "single-page-application",
@@ -19,10 +19,10 @@
19
19
  "Vsevolod Arutyunov <sevaru@inbox.ru>"
20
20
  ],
21
21
  "dependencies": {
22
- "@microzord/core": "^2.2.0"
22
+ "@microzord/core": "^2.2.1"
23
23
  },
24
24
  "peerDependencies": {
25
- "@microzord/core": ">=2.2.0"
25
+ "@microzord/core": ">=2.2.1"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public"