自定义组件未在此基本 ReactJS 应用程序上正确呈现 [英] Custom component not getting rendered properly on this basic ReactJS app
问题描述
我有一个非常基本的 ReactJS
应用程序,它使用 Redux
包含以下组件:
PanelMaterialSize >选择
/src/controls/PanelMaterialSize/PanelMaterialSize.js
import React, { Component } from 'react';从'react-redux'导入{连接};导入'./PanelMaterialSize.scss';导入从../选择/选择"中选择;import { setThemeList } from '../../store/AppConfig/actions';类 PanelMaterialSize 扩展组件 {componentDidMount() {this.n = 1;setInterval(() => {让主题列表 = [{ value: this.n, text: 'Option' + this.n },{ value: this.n + 1, text: 'Option' + (this.n + 1) },{ value: this.n + 2, text: 'Option' + (this.n + 2) },];this.props.setThemeList(themeList);this.n += 3;}, 1000);}使成为() {返回 (<div className="partial-designer-panel-material-size"><div><div className="label-input"><div className="label">MATERIAL</div><div className="输入"><选择数据={this.props.themeList} style={{ width: '100%' }}/>