Skip to content

Commit

Permalink
Merge pull request #9729 from weseek/feat/expose-react-instance-to-wi…
Browse files Browse the repository at this point in the history
…ndow-via-growi-facade

feat: Expose React Insance to window via GrowiFacade
  • Loading branch information
yuki-takei authored Mar 10, 2025
2 parents 0c063ca + fee2b3e commit 3c6099e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fair-worms-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@growi/core': minor
---

Expose React instance to window via GrowiFacade
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect } from 'react';
import React, { useEffect } from 'react';

import { initializeGrowiFacade, registerGrowiFacade } from '../utils/growi-facade-utils';

Expand All @@ -24,6 +24,7 @@ async function activateAll(): Promise<void> {
generatePreviewOptions,
},
},
react: React,
});

if (!('pluginActivators' in window)) {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/interfaces/growi-facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export type GrowiFacade = {
},
optionsMutators?: any,
},
react?: any,
};

0 comments on commit 3c6099e

Please sign in to comment.