Skip to content

Commit

Permalink
Cleanup legacy event.persist calls
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed May 29, 2022
1 parent d79aa03 commit 3ac6020
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions packages/components/src/input-control/reducer/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,6 @@ export function useInputControlStateReducer(
nextValue: actions.ChangeEventAction[ 'payload' ][ 'value' ],
event: actions.ChangeEventAction[ 'payload' ][ 'event' ]
) => {
/**
* Persist allows for the (Synthetic) event to be used outside of
* this function call.
* https://reactjs.org/docs/events.html#event-pooling
*/
if ( event && event.persist ) {
event.persist();
}

dispatch( {
type,
payload: { value: nextValue, event },
Expand All @@ -167,15 +158,6 @@ export function useInputControlStateReducer(
const createKeyEvent = ( type: actions.KeyEventAction[ 'type' ] ) => (
event: actions.KeyEventAction[ 'payload' ][ 'event' ]
) => {
/**
* Persist allows for the (Synthetic) event to be used outside of
* this function call.
* https://reactjs.org/docs/events.html#event-pooling
*/
if ( event && event.persist ) {
event.persist();
}

dispatch( { type, payload: { event } } );
};

Expand Down

0 comments on commit 3ac6020

Please sign in to comment.