Skip to content

Commit

Permalink
fix: update consistent suspense
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewPattell committed Dec 4, 2024
1 parent 390aedf commit 15f2be6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
9 changes: 5 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"prepare": "husky"
},
"dependencies": {
"@lomray/consistent-suspense": "^2.0.5",
"@lomray/consistent-suspense": "^2.0.6",
"@lomray/react-head-manager": "^2.1.0",
"@lomray/react-mobx-manager": "^4.0.1",
"@lomray/react-route-manager": "^2.0.0",
Expand Down
6 changes: 5 additions & 1 deletion src/pages/error-boundary/stores/main/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import SuspenseQuery from '@lomray/react-mobx-manager/suspense-query';
import { makeObservable } from 'mobx';

/**
* Error boundary page store
Expand All @@ -14,13 +15,16 @@ class MainStore {
*/
constructor() {
this.suspense = new SuspenseQuery(this);

makeObservable(this, {});
}

/**
* Get user
*/
public getUser = async (): Promise<void> => {
// add some delay
console.info('Emulate request...');

await new Promise((resolve) => {
setTimeout(resolve, 2000);
});
Expand Down

0 comments on commit 15f2be6

Please sign in to comment.