Hacker News new | past | comments | ask | show | jobs | submit login

As a JS dev I'm always shocked by the amount of variance and the lack of best practices in JS codebases...

Others will disagree, but I'd argue there are no real agreed on best practices like you might find in languages like Java in the JS/React world. Counter intuitively the JS community will often back away from tried and tested approaches since these get labeled as stale and boring so devs will often prefer to use whatever the hot new thing is when they spin up a new project.

There will be some no-nos though. If you're following a tutorial from more than a few years ago they might not be using React hooks, for example. Next.js is also starting to become fairly industry standard these days so that would also be a good shout in most cases.




I will believe this when the Java community agrees on an autoformatter.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: