React не видит путь к файлу Counter.jsx
Возникает ошибка Module not found: Error: Can't resolve './components/counter/' in 'C:\Users\Anubis\Desktop\Интернет магазин\client\src'. Хотя путь вроде правильный: C:\Users\Anubis\Desktop\Интернет магазин\client\src\components\Counter.jsx
Файл App.js:
import Counter from "./components/Сounter";
function App() {
return (
<div className="App">
<Counter/>
</div>
);
};
export default App;
Файл Counter.jsx:
import { useState } from 'react';
import React from 'react';
function Counter() {
const [count, setCount] = useState(0)
function increment() {
setCount(count + 1)
};
function decrement() {
setCount(count - 1)
};
return (
<div>
<h1>{count}</h1>
<button onClick={increment}>increment</button>
<button onClick={decrement}>decrement</button>
</div>
);
};
export default Counter;