问题标签 [react-native-ui-kitten]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
reactjs - 从反应原生动态生成的组件中获取值/状态
我有一个问题...
在一个项目中,我有一个从 JSON 生成的复选框列表。恢复选中哪些复选框的最佳方法是什么?
观察:我使用UI Kitten进行布局
代码详细信息
生成复选框的函数
从 JSON 中,我调用要在屏幕上显示的组件以及必要的数据。
但我不知道如何恢复它被选中的复选框,有人可以帮我吗?
太感谢了。
typescript - react-i18next on React Native 没有重载匹配这个调用打字稿
我正在尝试使用 typescript 4.1.2 在我的 React Native 应用程序中配置 react-i18next 11.8.2:
有两个资源文件(en,es)。
但是我在使用 useTranslation 钩子的 TFunction 接口上遇到了打字稿错误:
错误:
我可以通过解析 i18n 翻译的结果来解决这个错误,如下所示:
你知道为什么会这样吗?我认为它可能是 StyledLabel 道具,它只是 @ui-kitten/components 文本的样式组件
UI Kitten 的 text.component:
react-native - React native:组件没有从渲染中返回(UiKitten)
我有这个问题,我的代码运行良好,但如果我输入一个Accessory Right or Left
错误Nothing was returned from the render
。在其他屏幕上它工作得很好,但在这个屏幕上它是不可能的。UIKItten 有些东西我真的不明白。感谢您的帮助。
reactjs - UI小猫按钮自定义映射不起作用
我正在尝试删除应用于按钮文本的水平边距,但我无法将其删除,并且当我更改未应用的类别时,有人可以为我提供一个有关如何删除的示例按钮文本边距(使用自定义映射)
这里也是该类别的代码
javascript - 无法访问道具中箭头函数内的参数(React Native)
我正在尝试将参数(项目,它是 FlatList 中的数据项)传递给道具中的箭头函数。Popover 是一个 react-native-ui-kitten 元素。我的代码如下:
这里的问题是item
在声明为锚道具的箭头函数中未定义。这里的正确解决方案是什么?
reactjs - React Native UI-Kitten: Will running `npx react-native link` to link fonts affect other native modules?
I'm using UI Kitten with my latest React Native app, and in this section of the docs it says Run npx react-native link from the project root to link fonts with the native side
. I haven't used npx react-native link
in a long time because of autolinking. So my question is: will running npx react-native link
affect any of my native modules or anything else in the app in a way that I should know about (other than the desired linking of fonts here)?
react-native - React Native:更新上下文抛出“在现有状态转换期间无法更新”
我有一个反应本机应用程序,我正在尝试在自定义上下文中更新日期。
主题语境
带有日期的基本上下文和更新它的功能
应用程序.tsx
我只是有一个带有日期的状态并创建一个 setDate 函数。我将我的应用程序包装到上下文提供程序中。
选择器
我使用 lib 'DateTimePicker' 选择日期并绑定 onChange 以更新上下文。这个选择器在一个模式上。
所以当onChange
DateTimePicker 的功能被触发时会出现警告。错误出现在setState
(App.tsx
在 setDate 中)
Warning: Cannot update during an existing state transition (such as within 'render'). Render methods should be a pure function of props and state.
你知道如何纠正这个错误吗?
编辑 :
我正在使用 UI Kitten 库中的 Modal 组件。我切换到 react native Modal 并且错误消失了。似乎错误来自图书馆。对不起
提前感谢您的帮助,西尔万
react-native - 如何在android中按下后退按钮时关闭UI Kitten模式?
我正在为 React Native UI kitten 使用模态。
但问题是我没有找到像React Native为模态提供的onRequestClose道具之类的东西。他们的API上也没有提到任何内容。
那么有什么像我可以在按下后退按钮时关闭模式的吗?