В
Size: a a a
В
Е
В
В
В
В
d
CM
НА
Е
Е
Э
НА
НА
НА
НА
S
const path = './watch.txt';
fs.writeFileSync(path, data);
const watch = path => {
fs.watch(path, (event, file) => {
// console.dir({ event, file });
load(path);
});
};
const load = path => {
fs.readFile(path, 'utf8', (err, data) => {
if (err) throw err;
content = data;
// console.log('\x1Bc');
// console.log('Length: ' + content.length);
console.log(content);
});
};
load(path);
watch(path);
S
const mapStateToProps = (state: Store.IState): IStateToProps => ({ещё такая херотень стоит. Я так понял, чтоб в props попадали данные из редакса
orderSettings: orderSettingsSelector(state)
});
const mapDispatchToProps = (dispatch: Store.IThunkDispatch): IDispatchToProps => ({
loadOrderSettings: () => dispatch(getOrderSettings())
});
export default connect<IStateToProps, IDispatchToProps>(
mapStateToProps,
mapDispatchToProps
)(OrderSettings);
d
F