I joined Salma (@whitep4nth3r) on their livestream and helped them use Astro for the first time. Below are my notes on the experience.
https://www.twitch.tv/videos/1054128448
- process.env works inside of astro files. We should probably turn that into a warning somehow to use import.meta.env instead.
- the people REALLY miss prettier support
- another example of someone trying to use fetch() inside of a
.js
/.jsx
and having it not work! 3b. dito for top-level await, but I can't remember if it worked or not - unclear where the Astro syntax docs were, this person ended up in the "publishing astro components" docs
- style on top of files may be more common than on bottom, for our template examples. I prefer that and just saw it slightly trip up this streamer
- another example of someone who wanted an easy way to log debug info to the screen,. A built-in component could be nice
- Collections are tough to understand.
- she really wanted to be able to build a collection at the top-level (/$index.astro). 8b. second example of the permalink vs. file location relationship being off (doesn't warn if permalink !== file location)
- source map line numbers on the error page feel off? Didn't confirm.
- Collections are realllllly tough to understand. I think we do too many "learn by examples" in the docs and not enough "here's what should happen in each part of the collection function return object"
- our docs reference $[collection] which isn't a thing
- lol someone in chat likes the logging
- ⛔️ oh god, if you add a / at the end of whatever permalink returns, it crashes the entire process.
- hard to find, but they did the wrong thing in their permalink function (used ({tag}) instead of ({params})) and it just really silently caused things to break (since it returns a string, hard to see that it was broke). We could add some checks for "undefined" in the final permalink URL, but also maybe we could redesign so that it isn't the lynchpin of the entire thing 14b. If two calls to the collection permalink() fn return the same URL, I'd expect that to be a bug.
- docs don't highlight collection.data enough. This person didn't read deeply enough into the example snippet to find the
.data
usage but it also shows that we're hiding/obfuscating the relevant bits in our examples. 15b. Some of docs assume you're reading through them from top to bottom so they're very diff oriented, this is rarely the case - ⛔️ empty css class strikes again, killing her entire Astro process. took like 30 minutes to find that as the broken thing. Easily the most frustrating experience of the entire thing.
I had so much fun and thanks for joining me! Just a word of warning – the video will expire after 14 days so you might want to skip through it and clip sections you want to preserve!
Good luck and I look forward to the future of Astro!