File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " react-promise-tracker" ,
3- "version" : " 2.0.5 " ,
3+ "version" : " 2.0.6 " ,
44 "description" : " Simple React Promise tracker Hook/HOC helper to add loading spinner indicators" ,
55 "keywords" : [
66 " react" ,
Original file line number Diff line number Diff line change @@ -76,14 +76,12 @@ export const usePromiseTracker = (outerConfig = defaultConfig) => {
7676 }
7777 } ;
7878
79- const fn = ( anyPromiseInProgress , areaAffected ) =>
80- updatePromiseTrackerStatus ( anyPromiseInProgress , areaAffected ) ;
81-
8279 React . useEffect ( ( ) => {
8380 latestInternalPromiseInProgress . current = internalPromiseInProgress ;
84- emitter . on ( promiseCounterUpdateEventId , fn ) ;
81+ emitter . on ( promiseCounterUpdateEventId , updatePromiseTrackerStatus ) ;
8582
86- return ( ) => emitter . off ( promiseCounterUpdateEventId , fn ) ;
83+ return ( ) =>
84+ emitter . off ( promiseCounterUpdateEventId , updatePromiseTrackerStatus ) ;
8785 } , [ ] ) ;
8886
8987 return { promiseInProgress } ;
You can’t perform that action at this time.
0 commit comments