fwh1990

Results 188 comments of fwh1990

Try to remove `@types/webpack` for webpack@5

看起来更像是hooks被嵌套使用,然后re-render时部分hooks没有被执行到 https://stackoverflow.com/questions/65548028/error-should-have-a-queue-this-is-likely-a-bug-in-react-please-file-an-issue

查了一下资料,得出结论就是RN不能使用 动态的`import()`功能,只能直接引入定义了。语言文件不多的话,也是能接受的 ```diff import { createI18n } from '@i18n-chain/react'; + import zh from './locales/zh'; const i18n = createI18n({ defaultLocale: { ... }, }); + i18n.define('zh', zh); ```

问卷调查一下,您在用这个库的适合,是否会经常忘记写 useI18n(...)

能动态切换是因为你有其他的state导致了重渲染。加useI18n()的唯一作用就是为了及时重渲染。 我等下先发个兼容taro3的。 然后在下一个主版本中,升级对useI18n()的新用法。大概思路是,`const t = useI18n(i18n)`,use完才能使用,就是说`const i18n = createI18n()`不能直接走链式,只能使用一些公共接口

想起来了,因为taro3使用了原生的react,所以您可以直接安装 `@i18n-chain/react`。 以及如果您有使用 `hack()`方法,taro3也不再需要这个方法了

2.0尝鲜。https://github.com/fwh1990/i18n-chain/releases 新加的字符串模板生成工具我感觉很棒

为什么会有空值?如果没有类型错误,应该不会出现这个情况