react-native - 以编程方式对本机 this.props 所有值做出反应
问题描述
我的问题很简单。
我想知道所有的钥匙
这个.props
这是我的 React 组件的 react native props
export default class TapBar extends React.Component{
constructor()
{
super();
this.props.what?
}
}
有时 this.props 的键是 'a' 或 'b' 或 'navigation'
有时不取决于使用情况。
我怎样才能打印控制台所有这些?
解决方案
在这里你可以根据你的代码控制台链接这个
export default class TapBar extends React.Component{
constructor(props)
{
super(props);
console.log(props) // find what you want
}
}
推荐阅读
- javascript - 将 div 居中在另一个 div 中的最佳方法是什么?
- c - 如何在 C 中推送和弹出 void 指针
- c++ - 使用 createprocess() 调用时,Windows 的 wget 会忽略选项
- javascript - 如何使用javascript更改数据集(div)中的文本(CLASS DOESN'T WORK)
- android - 从从firebase检索的图像视图中设置壁纸 - android
- logic - 创建一个对给定 x 值的多项式进行微分的函数?
- google-apps-script - 从自己的驱动器访问文件时如何使用更窄的 Google Apps 脚本授权范围
- assembly - 如何编码子立即 83 / 5 操作码的操作数,如 sub edx、0x3a?
- django - 如何将 Django 访问者文件上传到新的子目录,目录名称应该是会话名称?
- reactjs - 我们如何在扩展面板中跟踪每个表单的状态