Skip to content

Commit

Permalink
[core] Add more context about useEventCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Sep 16, 2023
1 parent 4930c3b commit 89635d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/mui-utils/src/useEventCallback/useEventCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import * as React from 'react';
import useEnhancedEffect from '../useEnhancedEffect';

/**
* https://github.com/facebook/react/issues/14099#issuecomment-440013892
* Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892
* See RFC in https://github.com/reactjs/rfcs/pull/220
*/
function useEventCallback<Fn extends (...args: any[]) => any = (...args: unknown[]) => unknown>(
fn: Fn,
Expand Down

0 comments on commit 89635d1

Please sign in to comment.