-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
taro 3.6 react入口组件app.ts文件中使用Provider设置全局状态 ,文件是.ts,使用不了redux的Provider组件,这怎么解决 #16888
Comments
把ts改成tsx |
谢谢,因为一开始改为tsx,重新编译会报找不到app.ts文件,实在没找到解决方案,现在改为tsx重启又可以了,不知道为啥 |
This was referenced Nov 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关平台
微信小程序
小程序基础库: 3.6.5
使用框架: React
复现步骤
app.ts文件
function App({ children }: PropsWithChildren) {
useLaunch(() => {
console.log('App launched.')
console.log("children",children)
})
// children
return (
// 在入口组件不会渲染任何内容,但我们可以在这里做类似于状态管理的事情
{children}
)
}
期望结果
能成功在app.ts中通过Provider组件注入store
实际结果
没有成功
环境信息
The text was updated successfully, but these errors were encountered: