Skip to content

Instantly share code, notes, and snippets.

@bootrino
Created March 23, 2021 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bootrino/771f865e4c643104b70d1a034759d93d to your computer and use it in GitHub Desktop.
Save bootrino/771f865e4c643104b70d1a034759d93d to your computer and use it in GitHub Desktop.
/*
// 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