This commit is contained in:
+1
-1
@@ -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 (
|
||||
|
||||
+1
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user