Bad UX is everywhere. Perhaps more so in dev tooling. Take React Native for example.
It’s 2020 and I finally decided to adopt React for everything. Not because it’s hyped, but because it’s mor explicit and less pain than Vue when complexity goes up, and because it’s not as overengineered as Angular.
So, I go to the official website and check how to install the app. There’s something called Expo, and after researching a bit I decide against it (because choosing convenience above other things doesn’t make sense in an immature ecosystem).
Also, for some reason, CRNA (create-react-native-app) isn’t officially encouraged anymore. By the way, CRNA almost makes me mistake it for CERN — one makes black holes, while the other is a black hold (haha, very funny!).
Anyway, so I’ve installed node and everything and am ready for the amazing magical moment when you scaffold your app.
npx react-native init daily-thought-app
If you are into React Native, you’ve likely already spotted what’s going to happen. But if not, after a few seconds my face was like this:
Here’s why. I saw it all crashing down with this error message:
error "daily-thought-app" is not a valid name for a project. Please use a valid identifier name (alphanumeric).
I HATE camel case naming in directories. And I hate spaces as well. So, when I have multiple words, I like to join them using hyphens or underscores. So, naturally, I don’t appreciate this arm-twisting as a developer.
Was the fix too hard for the tooling folks? I don’t think so. Just sanitize the string being passed and create the app name in whatever format you enforce. But for God’s sake! — don’t tell me how to name my directories.
And now someone will be thinking, “You idiot! There’s an option you could have passed in the command line to set the directory name”. I hope that is possible, but I also hope that you realize that a thing is not obvious to those who don’t know it. Besides, remembering that such an option exists and typing more characters for it every time is more congnitive overload.
You dropped the ball, React Native (or Node).
But I forgive you, because you’re much, much better than WordPress. 😂😂