实战分析:评论功能(一) 报错:未能找到指定路径


  • 0

    目录结构:
    0_1511839801493_upload-39200b43-e119-401d-bd0c-002db3a1dbea

    APP组件代码:
    import React, { Component } from 'react';
    import logo from './logo.svg';
    import './App.css';
    import CommentList from './CommentList';
    import CommentInput from './CommentInput';

    class App extends Component {
    render() {
    return (
    <div>
    <CommentList />
    </div>
    );
    }
    }

    export default App;

    CommentInput 组件代码:
    import React, { Component } from 'react';

    class CommentInput extends Component {
    render() {
    return (
    <div>CommentInput</div>
    )
    }
    }

    export default CommentInput;

    报错:
    0_1511839969257_upload-4a9895ad-53fe-430a-8999-50d78ba25a26

    备注:APP组件中删除import CommentInput from './CommentInput'; 该行代码,代码正常运行!


登录后回复
 

与 ScriptOJ 的连接断开,我们正在尝试重连,请耐心等待