I am making calculator by react.
An error occurred trying to separate code into module.
Please let me know why the error occurred and how to solve it.
Error:
./src/App.js
Module not found: Can't resolve 'Cache' in '$HOME/calculator/src'
App.js
import React, { Fragment, Component } from "react";
import Cache from "Cache";
class App extends Component {
render() {
return <Calculator />;
}
}
class Calculator extends Component {
return (
<Fragment>
<Cache />
</Fragment>
);
}
export default App;
Cache.js
import React, { Fragment, Component } from "react";
class Cache extends Component {
render() {
return (
<Fragment>
<h2>Cache</h2>
</Fragment>
);
}
}
export default Cache;
This is my Github URL:
https://github.com/kaibara/calculator/pull/4/files
Thank you