Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
App.propTypes = {
todos: PropTypes.array.isRequired,
actions: PropTypes.object.isRequired
};
const mapStateToProps = state => ({
todos: state.todos
});
const mapDispatchToProps = dispatch => ({
actions: bindActionCreators(TodoActions, dispatch)
});
export default compose(
applyReducers({ todos }),
connect(mapStateToProps, mapDispatchToProps)
)(App);
}
}
const mapStateToProps = (state, props) => ({
translation: state.dictionary[generateId(props)]
});
const mapDispatchToProps = (dispatch, props) => ({
fetchTranslation() {
dispatch(fetchTranslation(props));
}
});
export default compose(
withLocale,
applyReducers({ dictionary }),
connect(mapStateToProps, mapDispatchToProps)
)(Dictionary);