![](/img/trans.png)
[英]Preact router Property 'path' does not exist on type 'IntrinsicAttributes'
我目前在使用 preact 路由器制作我的網站時遇到問題。 每當我嘗試在路由器中放置一些東西時,它都會出現錯誤,屬性“路徑”在類型“IntrinsicAttributes”上不存在。 但它不會阻止網站運行,但每當我將 url 更改為“/shop”時,它都不會顯示任何內容。 店鋪 functionim ...
[英]Preact router Property 'path' does not exist on type 'IntrinsicAttributes'
我目前在使用 preact 路由器制作我的網站時遇到問題。 每當我嘗試在路由器中放置一些東西時,它都會出現錯誤,屬性“路徑”在類型“IntrinsicAttributes”上不存在。 但它不會阻止網站運行,但每當我將 url 更改為“/shop”時,它都不會顯示任何內容。 店鋪 functionim ...
[英]Programmatically route with wmr / preact-iso?
我一直在使用wmr和preact-iso並來自 preact-cli、preact-router 等,我對如何做一些我曾經能夠做的事情有點困惑。 例如:preact-iso 的路由器 package 似乎缺少 preact-router 的route() function。 我將如何從代碼中路由? ...
[英]preact-router/match without babel
Preact 吹噓它不需要構建工具,但我看不到讓preact-router/match工作的方法。 當我做:<script type="module"> import { Match } from 'https://unpkg.com/preact-router@3.2.1/ ...
[英]how can i create a page transition with preact
我正在嘗試使用preact-router進行頁面轉換,我已經嘗試了preact-transition-group包和preact-css-transition-group包,這給了我一個錯誤,無論如何這里是我的基本設置: 打字稿和/或preact-router解決方案是可取的,但不是必需的。 ...
[英]Preact error: "objects are not valid as a child. Encountered an object with the keys {}" when using async await in root component
我是第一次使用 Preact。 我只是用 preact-cli 和這個默認模板創建了一個新項目: https : //github.com/preactjs-templates/default 。 在app.js我試圖使用這個代碼: import { Router } from 'preact- ...
[英]Multiple preact-router routes rendered at the same time in SSR (on Vercel)
如果您在https://startupguide.vercel.app/ 上將go 轉到我的 Preact 應用程序並單擊“名稱生成器”,您將只看到名稱生成器表單(應該是)。 但是,如果您從 go 到https://startupguide.vercel.app/namegenerator並刷新頁 ...
[英]testing routing capabilities of preact-router
我如何能夠在下面的代碼中測試路由器? 使用 React 時,您可以使用 MemoryRouter 傳遞 initialEntries 來模擬路由更改,但我找不到 preact-router 的替代方案。 我查看了 Preact 文檔和 preact-router 文檔,但找不到明確的解決方案。 ...
[英]preact-router with default case not working as intended
我是新來preact ,我試圖發展與Preact-X項目。 我希望我的項目以僅包含一個組件的默認URL運行。 例如: loaclhost:8080 , localhost:8080/jobs , localhost:8080/?some-parameters 。 我有一個像下面 ...