如何在 React Native 中导入组件并在手风琴中使用它

问题描述

我有一个功能组件,我想导入该组件并在 Accordion 中使用它,react-native-collapsible/Accordion 是用于制作可折叠的第三方包。包名称function _renderADHeader() { ... ... ... export default connect(mapStatetoProps,mapdispatchToProps)(_renderADHeader);

我的组件:

import {_renderADHeader} from './sections/address/headerBar/index';

在我的主文件中,我通过以下方式导出了这个组件:

Accordion

我想在 <Accordion renderHeader={_renderADHeader} />; 中使用它

TypeError: renderHeader is not a function.

但是,我收到以下错误

this._renderHeader

我尝试编写 modules: http_2xx: prober: http timeout: 5s http: valid_http_versions: ["HTTP/1.1","HTTP/2.0"] method: GET preferred_ip_protocol: "ip4" ip_protocol_fallback: false no_follow_redirects: false fail_if_ssl: false fail_if_not_ssl: false tls_config: insecure_skip_verify: true ts=2021-01-19T13:03:48.845511222Z caller=main.go:304 module=http_2xx target=https://prometheus.io level=info msg="Beginning probe" probe=http timeout_seconds=119.5 ts=2021-01-19T13:03:48.845712204Z caller=http.go:342 module=http_2xx target=https://prometheus.io level=info msg="Resolving target address" ip_protocol=ip6 ts=2021-01-19T13:03:48.848026649Z caller=http.go:342 module=http_2xx target=https://prometheus.io level=info msg="Resolved target address" ip=2606:4700:3035::6815:3eac ,但这也不起作用。请告诉我我做错了什么。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)