Tamagui Error 解決方法匯總

tamagui
tamagui

‘PortalDispatchContext’ cannot be null, please add ‘PortalProvider’ to the root component

https://github.com/tamagui/tamagui/issues/2824

全部 tamagui 的 library 版本必須保持一致。

// 錯誤的
"tamagui": "1.120.1",
"@tamagui/config": "^1.116.14",
"@tamagui/portal": "1.116.14",
//
"tamagui": "1.120.1",
"@tamagui/config": "1.120.1",
"@tamagui/portal": "1.120.1",

You’re rendering a Tamagui <Adapt /> component without nesting it inside a parent that is able to adapt

https://github.com/tamagui/tamagui/issues/3024

直到 1.116.15 版本都還有這個問題,升級至 1.120.1 後解決了。

guest

0 評論
最舊
最新 最多投票
內聯回饋
查看全部評論