cjohansen / portfolio

Eclipse Public License 1.0
222 stars 13 forks source link

Improvement with ErrorBoundary on defscene #10

Closed geraldodev closed 1 year ago

geraldodev commented 1 year ago

Description: I encountered a rendering error while working with ClojureScript (cljs). The error was caused by a mistake in the attribute map, where I mistakenly passed children. Unfortunately, without the ErrorBoundary class component, it was challenging to debug the issue effectively.

When I attempted to run the code without the ErrorBoundary, all I received was an empty slot without the DOM mounted, accompanied by a cryptic React error message. Clicking on the message only led me to compiler-generated code, which wasn't very helpful in diagnosing the problem.

image

image

I believe implementing an ErrorBoundary on defscene would greatly improve the situation. This would localize the error, allowing it to be captured within the ErrorBoundary.

image