npm i counter-test-datagile
В приложении:
import Counter from 'counter-test-datagile';
import 'counter-test-datagile/dist/style.css';
const MyComponent = () => {
return (
<>
<Counter />
</>
);
};git clone https://github.com/ilyasudakov/counter-test-datagile.git
cd counter-test-datagile
npm run start
- React / Typescript
- Redux
- Tailwind
Решил разбить компонент Counter на базовый (BasicCounter) и дочерние (CounterWithInterval, CounterWithControls) в соответствии с Liskov principle из SOLID.