1
14
你必须集中精力
你应该做的另一件事是使用单词或字符作为参考。这些将被称为对象,而数字的调用可能有点混乱。即
|
2
1
回答的问题肯定是有益的,但我的
这就是我所做的,在构造函数中创建引用(可能这就是react所建议的)。在我的例子中,我需要4个文本输入框
然后像这样渲染组件
请注意TextInput中的引用。在我的onChange中,我传递一个标志,告诉它是哪个按钮
这就是我
|
3
0
对于native base,需要进行一些小的更改。 它使用getRef而不是ref。以下代码将在文本更改时更改为下一个输入字段,并在删除输入时恢复为上一个字段。
|
John · 如何确定Javascript自引用循环是否完成[重复] 2 年前 |
Bonhart · 有没有更好的方法按名称查找数组中的特定对象? 2 年前 |
ubermo · 如何在React本机自定义组件中使用状态? 2 年前 |
Audrey K · 有没有办法降级React Native? 2 年前 |
Tedi · 如何将单个数据从子组件传递到父组件? 2 年前 |