小编Fao*_*tam的帖子

React JS 错误:未定义“组件”

我是 ReactJS 的初学者,我准备了以下文件:

应用程序.js

import React, { Component } from "react";
import "./App.css";
import InstructorApp from "./component/InstructorApp";

class App extends Component {
  render() {
    return (
      <div className="container">
        <InstructorApp />
      </div>
    );
  }
}

export default App;
Run Code Online (Sandbox Code Playgroud)

列表课程组件.jsx

class ListCoursesComponent extends Component {
  render() {
    return (
      <div className="container">
        <h3>All Courses</h3>
        <div className="container">
          <table className="table">
            <thead>
              <tr>
                <th>Id</th>
                <th>Description</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>1</td>
                <td>Learn Full stack with Spring Boot and Angular</td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    );
  }
} …
Run Code Online (Sandbox Code Playgroud)

reactjs

1
推荐指数
1
解决办法
881
查看次数

标签 统计

reactjs ×1