Hey @marcdk,
I believe the issue is happening due to the call to setAttributes in your edit function.
Check out this comment to get a better understanding of what’s going on: https://github.com/WordPress/gutenberg/issues/21712#issuecomment-616397193
As @talldan mentions, “React usually has a reactive way of rendering, when changing some data, the render function is called again. So when calling setAttributes, the edit function is triggered, which calls setAttributes again, ad infinitum…”
I hope this helps!