Enforce React Rules of Hooks with eslint (#24911)

This commit is contained in:
Renaud Chaput
2023-05-09 03:09:11 +02:00
committed by GitHub
parent 955179fc55
commit d9b93bd15e
6 changed files with 12 additions and 0 deletions

View File

@ -72,6 +72,7 @@ const mapDispatchToProps = (dispatch, { onPickEmoji }) => ({
},
onPickEmoji: emoji => {
// eslint-disable-next-line react-hooks/rules-of-hooks -- this is not a react hook
dispatch(useEmoji(emoji));
if (onPickEmoji) {

View File

@ -26,6 +26,7 @@ const mapDispatchToProps = dispatch => ({
},
onClose (value) {
// eslint-disable-next-line react-hooks/rules-of-hooks -- this is not a react hook
dispatch(useLanguage(value));
},