I have an onclick handler that looks like this:
<ButtonPrimary
alignSelf="center"
component="a"
marginBottom={4}
marginTop={4}
onClick={() => {
triggerCall()
closeModal()
clearFilters()
}}
size={SIZE.LARGE}
>
See results
</ButtonPrimary>
the triggerCall() method in the onClick() handler looks like this:
const triggerCall = () => {
if (getDefault) {
getDefault === 'a'
? window.show('typeA')
: window.show('typeB')
} else {
isDefaultEnabled
? window.show('typeA')
: window.show('typeB')
}
}
The above method checks state and makes an api call to fetch a type of view. I am running into a weird situation where in my local environment things work fine. I can drop breakpoints on the method in the onClick() handler and the request is made as expected. However, when I deploy my changes to my live dev env, the method is never called. Looking in the console I can't place a breakpoint and the app. never goes into the method. Is it a react issue or did I structure my code incorrectly? Is this indicative or a larger issue I am not aware of and should address in my app?