问题描述
**
// using I18nManager you can get initial direction of device or you can use async storage or both of them as combined. i really dont care now...
const LanguageDirectionContext = createContext({
direction: 'ltr'
})
const LanguageDirectionProvider = ({ children }) => {
const [direction,setDirection] = useState('ltr')
const toggleDirection = () => {
setDirection(direction === 'ltr' ? 'rtl' : 'ltr')
}
useEffect(() => {
// use I18nManager to force direction and use asyncstorage to save the current direction to device.
},[direction])
return (
<LanguageDirectionContext.Provider value={{
direction,toggleDirection
}}>
{children}
</LanguageDirectionContext.Provider>
)
}
**
我尝试了上面的代码在react native中创建动态链接,并且下面的链接是从上面的代码创建的 https://narola.page.link/post/12345?link=https%3A%2F%2Finvertase.io
但是当尝试从上面的链接打开应用程序时,它说无效的动态链接。 注意:必须使用参数创建动态链接。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)