Understanding LayerMap Memoization with Equal/Hash Implementations

I'm wrapping a React context value into an Effect Layer using LayerMap. The context value implements Equal.Equal and Hash. However, the Layer seems to be recreated on every React re-render even though the objects are structurally identical.

Does LayerMap.lookup() use the key's Equal/Hash implementation for memoization, or does it rely on reference equality?
Am I missing something about how LayerMap deduplicates? should I be using something else instead?
Was this page helpful?