Hacker News new | ask | show | jobs
by gwbas1c 628 days ago
> A page written in HTML and vanilla JavaScript, loaded from the public/ directory, completely outside of the Next.js + React system.

I once had a newcomer open up a PR that completely bypassed the dependency injection system.

> Vanilla JavaScript loaded in via filesystem APIs and executed via dangerouslySetInnerHTML

I wish I had more context on this one, it looks like someone is trying to bypass React. (Edit) Perhaps they learned HTML, wanted to set the HTML on an element, and React was getting in the way?

> API calls from one server-side API endpoint to another public API endpoint on localhost:3000 (instead of just importing a function and calling it directly)

I once inherited C# code that, instead of PInvoking to call a C library, pulled in IronPython and then used the Python wrapper for the C library.