This commit is contained in:
Philippe Torrel
2026-10-27 08:59:48 +01:00
parent b2577c249a
commit 72d02ee501
2 changed files with 2 additions and 1 deletions
@@ -3,7 +3,7 @@ import { useId } from 'react';
const ExampleUseId = (props) => {
// const { } = props;
const id = useId().replaceAll(/[_r.]/g, '');
const id = useId(); // _r_1
// const id = uid(); // von uuid ⇨ 'b18794e8-5d0d-417c-b361-ba38e78411b4'
return (
@@ -14,6 +14,7 @@ function reducer(state, action) {
switch (type) {
case 'INCREASE':
return { ...state, counter: state.counter + 1 };
case 'DECREASE':
return { ...state, counter: state.counter - 1 };
case 'DOUBLE':