Всем привет. Есть класс Store, который нужно импортировать в компонент App, но вылетает "Expected an assignment or function call and instead saw an expression no-unused-expressions". Что делаю не так?
Store:
export default class Store {
constructor(reducer) {
this._reducer = reducer;
this._state;
this._callbabks = [];
}
dispatch(action) {
this._state = this._reducer(this._state, action);
this._callbabks.forEach(item => item());
}
get state() {
return this._state;
}
subcribe(callback) {
this._callbabks.push(callback);
return callback;
}
unsubcribe(callback) {
this._callbabks = this._callbabks.filter(item => item !== callback);
}
};
App:
import React, { Component } from 'react';
import './App.css';
import Store from './redux/store'
class App extends Component {
render() {
return <h1>Test</h1>
}
}
export default App;