MonacoEditor only recalculates its bounds when the browser window is resized. The container div might change size arbitrarily however, so we need to use something that reacts to the container size changes instead.
Solution
Use a ResizeObserver
Result
MonacoEditor resizes correctly when its container is resized.
Problem
MonacoEditor only recalculates its bounds when the browser window is resized. The container div might change size arbitrarily however, so we need to use something that reacts to the container size changes instead.
Solution
Use a ResizeObserver
Result
MonacoEditor resizes correctly when its container is resized.