5a2e8dfcf8
CI / verify (pull_request) Has been cancelled
Vite was bundling plugin-framework-react runtime twice, so tab pages crashed with useContext is not a function on enter/switch. Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
513 B
TypeScript
20 lines
513 B
TypeScript
import './lib/text-encoding-polyfill';
|
|
import { PropsWithChildren } from 'react';
|
|
import WechatShareBootstrap from './components/WechatShareBootstrap';
|
|
import { patchTaroH5Hooks } from './lib/patch-taro-h5-hooks';
|
|
import './app.css';
|
|
|
|
// H5:在首屏 page hooks 执行前,把 Taro.useDidShow 等绑到与 createReactApp 同一份 runtime
|
|
patchTaroH5Hooks();
|
|
|
|
function App({ children }: PropsWithChildren) {
|
|
return (
|
|
<>
|
|
<WechatShareBootstrap />
|
|
{children}
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default App;
|