How do you choose which framework or library to use in your projects?
There is no absolute "correct" answer here π€¨
For me it comes down to:
- Support (when was the last commit?)
- Up to date with latest features of the language or toolchain (e.g. ESM)
- Developer experience (how much setup is needed?)
- Flexible (easy to swap with another library if necessary)
- Type safety (the more the better)
Here are my current choices for web/mobile π
Mobile: Cross platform, Flutter vs React native
I have a background in developing native Android apps. That was not fun π
Cross platform for my personal work is a not brainer. I use both dart and typescript since a long time.
Therefore: Flutter or React native?
I went with Flutter for the past few years:
- Easier to install and configure
- Faster to compose UI
- More type safe (dart with sound null safety)
Effect (typescript): React native again?
I tried React native in the past. It was not fun π
The amount of configuration needed and the lack of features was overwhelming.
Nonetheless, the rise of effect
in typescript and the grow of Expo are pushing me to reconsider React native again.
Alert: Possible React native (with
effect
) project incoming π
macro is coming in dart
Wait! Another big update may cause the definitive win of Flutter over React native.
Static metaprogramming π
Macro in @dart_lang 3.4 (behind a flag π©) Work in progress to start experimenting with macros in dart 3.4 (possibly π€) Example: `fromJson` and `toJson` using `macro` and a method/constructor/class definition π
Metaprogramming has the potential to solve all the major issues with dart, mostly related to code generation and build_runner
.
Alert: Incoming project using
macro
once dart 3.4 lands π
There is more π€©
Every week I dive headfirst into a topic, uncovering every hidden nook and shadow, to deliver you the most interesting insights
Not convinced? Well, let me tell you more about it
Web: it depends π€
On the web the battle is more intense.
Some tools are easy to pick:
vite
vitest
eslint
prettier
What about frameworks instead?
For me is all-in on react
, the rest it really depends:
- Mostly
nextjs
(but definitely not always π ββοΈ) preact
(smaller projects)- Remix (more control)
- Vanilla typescript (for libraries)
Styling: tailwind (and never look back)
I tried close to all the solutions out there for styling with CSS.
Once I landed on tailwind I never came back πͺ
I have been using v4 (alpha) for the last couple of weeks. It's mind-blowing π
- No more configuration file
- All styles defined in CSS
- Faster (x10)
Type safety: required features
In any language and project:
- Type system (I don't deal with dynamic languages, it's not fun π)
- Errors as values (
Option
andEither
) - Pure functions (as much as possible)
- Controlled effects (push IO to the edges)
- Pattern matching
Since not many languages ship these features out of the box, I fallback to libraries ππΌββοΈ
Again, There is no absolute "correct" answer here. As developers we must continuously try new stuff and be open to new libraries, features, and patterns.
That's what makes it fun: everything changes fast and there is no time to get bored π
See you next π