4 ms·
>What I miss in JS ecosystem is something single which solves all my problems. Like npm which can also build website, which can hot reload it for dev mode, whic
by n2d4 4y ago
>What I miss in JS ecosystem is something single which solves all my problems. Like npm which can also build website, which can hot reload it for dev mode, which can autoformat my code with single blessed unconfigurable code style, which can lint it, which can run unit tests and so on. I don't want to spend a single second setting up my environment.
For this, you have Next.js/SvelteKit/Nuxt.js/whatever framework you prefer. For React in particular, Next.js with the default setup has all of these features but unit testing (there's a template for that, but it isn't as commonplace in frontend as it should be), and more such as server-side rendering, routing, data fetching, etc.
- klysm 4y agoI don’t bother unit testing my front end - I’ve never found it to be worth the time
- dariusj18 4y agoWhen using typescript, unit testing needs are few and far between.
- n2d4 4y agoI get that. Testing components in particular is something I've rarely found to be worth it as well. But often I find myself writing logic in the frontend, say for processing data from the API. That's where I want to create a file and write a unit test because it would actually be easier. Sadly for a small project the effort of configuring and maintaining updates of an external test framework on-top of Next makes no sense.
- klysm 4y agoYeah sure if there are some pure functions involved then by all means unit test.