import react from 'react';
import { actions } from '../store/store';
import { useDispatch, useSelector } from 'react-redux';
import { IonButton } from '@ionic/react';
const Test: react.FC<{}> = () => {
console.log('Rendering ');
const dispatch = useDispatch();
const state = useSelector((state: { test: any }) => state.test.part1);
return (
{state.title}
dispatch(actions.increment1())}>
Increment 1 (and re-render)
dispatch(actions.increment2())}>
Increment 2 (no re-rendering)
);
};
export default Test;