MK
onClick={() => props.onDelete(props.task)} или onClick={props.onDelete.bind(null, props.task)}?Size: a a a
MK
onClick={() => props.onDelete(props.task)} или onClick={props.onDelete.bind(null, props.task)}?АБ
PW
MK
АБ
DT
onClick={() => props.onDelete(props.task)} или onClick={props.onDelete.bind(null, props.task)}?PW
MK
DT
PW
DT
PW
DT
V
React Hook "useContext" cannot be called inside a callback. React Hooks must be called in a React function component or a custom React Hook function.eslint(react-hooks/rules-of-hooks)
whithMyHOC = Component = props => {
const {} = useContext(anyStore);
return <Component {…props} />
}
-V
MK
React Hook "useContext" cannot be called inside a callback. React Hooks must be called in a React function component or a custom React Hook function.eslint(react-hooks/rules-of-hooks)
whithMyHOC = Component = props => {
const {} = useContext(anyStore);
return <Component {…props} />
}
-const whithMyHOC = Component => {
const MyComponent = props => {
const {} = useContext(anyStore);
return <Component {...props} />;
};
return MyComponent;
};V
V
const whithMyHOC = Component => {
const MyComponent = props => {
const {} = useContext(anyStore);
return <Component {...props} />;
};
return MyComponent;
};MK
Л