Created
March 23, 2021 03:39
-
-
Save bootrino/771f865e4c643104b70d1a034759d93d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
// how to find out what is causing renders | |
const renderCount = useRef<number>(0) | |
const prev_getStateMachineNewState = useRef<any>() | |
const prev_getAjaxRequestCache = useRef<any>() | |
const prev_getApplicationState = useRef<any>() | |
const prev_getFormErrorData = useRef<any>() | |
log(`getFormErrorData ${(prev_getFormErrorData.current !== getFormErrorData) ? "changed" : "not changed"}`) | |
log(`getAjaxRequestCache ${(prev_getAjaxRequestCache.current !== getAjaxRequestCache) ? "changed" : "not changed"}`) | |
log(`getApplicationState ${(prev_getApplicationState.current !== getApplicationState) ? "changed" : "not changed"}`) | |
log(`getStateMachineNewState ${prev_getStateMachineNewState.current !== getStateMachineNewState? "changed" : "not changed"}`) | |
prev_getStateMachineNewState.current = getStateMachineNewState | |
prev_getApplicationState.current = getApplicationState | |
prev_getAjaxRequestCache.current = getAjaxRequestCache | |
prev_getFormErrorData.current = getFormErrorData | |
renderCount.current++ | |
log(`Edit Stage rendercount: ${renderCount.current} ${getFormData.stage_name} `) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment