我想在我的preact应用中使用一些React兼容的包。我已经按照说明安装了preact-compat。现在,当我将React组件添加到应用程序中时,我仍然需要从preact导入'h‘,否则我会收到错误: Uncaught (in promise) ReferenceError: h is not defined例如:import { render } from 'react-dom';
import {
在使用React时,您可以使用MemoryRouter传递initialEntries来模拟路由更改,但我找不到替代preact-router的方法。我看了Preact文档和preact-router文档,但我找不到明确的解决方案。import 'preact/debug';import HomePage from './pages/homepage
我试图从vercel安装Next.js/Preact.js安装程序,但得到以下错误:Creating a new Next.js app in /home/somayyah/Documents/using-preact-app.Downloading files for example using-preact. T