News for hackers. Stuff that matters.
Re:Why does anyone use Angular in production? by yladiz on Friday November 05, 2021 @07:38AM (#29117834)
The code you just put is vanilla JS, so yes it's normal, it doesn't require any compilation step to work. If you made a React component that returns something that didn't require a compilation step, like Hyperscript, then it too would be normal Javascript. You can argue that having a function perform a side effect in this way isn't a good design decision but it is supported in the language and "normal".

There are no comments on this comment yet.