event.preventDefault() или event.stopPropagation() иначе убираем.
const initialState = {
field: 'value'
}
const reducer = (state = initialState, action) => {
// do staff
}
<h1 className="main-title">{s1_h1_text?.text}</h1>
/* эквивалент */
<h1 className="main-title">{s1_h1_text && s1_h1_text.text}</h1>
const action = (payload) => {
return {
type: ACTION_TYPE,
payload,
};
};
// inside component
const getSummarize = ({a, b, c}) => a + b + c;
dispatch(action(getSummarize(payload)));