Will trigger the useEffect every single time, even though {emptyObject:{}} is the same value every time, because it’s technically a new object, even though both are {}. There might be a way to store the old value as a ref and diff it though, if you really need to…? What are you trying to do with the fields?
Yeah, this is what I understood was standard react behavior, but in this case I was wondering if there was a way that the reference could avoid changing. While that behavior is standard, what isn’t typical in react is that you’d have the reference constantly changing. It sounds like this is a consequence of the iframe.
It might be worth mentioning in the docs somewhere when introducing the context object or something like that.
Thanks for the suggestion. This was the path I was going to go down, but felt if you don’t have to do a deep comparison, you wouldn’t want to. I didn’t realize the iframe was part of the cause of this and wanted to be sure it wasn’t an oversight in how the objects were being created/updated.