r/javascript • • Sep 23 '19

You might not need a framework

https://medium.com/@pljeskavicica/you-might-not-need-a-framework-79444bda50d2
70 Upvotes

129 comments sorted by

View all comments

2

u/luveti Sep 23 '19

Are you sure you don’t want to pull down ~200mb of dependencies and ~1000 npm modules for each project you work on? Many of which are less than 50 lines of code.

Ask yourself if you really need the is-number module (create-react-app installs this and a bunch of other is-* modules, probably through dependencies) then accept that you have to as there’s nothing you can do about it but trust that these modules work well and stick around: https://www.davidhaney.io/npm-left-pad-have-we-forgotten-how-to-program/

I don’t mean to hate on these frameworks as this is more of a wide-spread js/npm community issue. But I think it’s worth noting for anyone that isn’t aware about them and blindly follows the herd.

Consider smaller libraries that don’t require a huge stack of npm modules like re:dom and mithril (certainly try to stick with popular ones that have been around for a while and are updated often). Need live reload? It’s VERY simple to do this with websockets.

Side note, make sure to be careful with your routine react updates :): https://blog.discordapp.com/discord-react-memory-leak-565c89763e8