1,038 karma · joined December 12, 2012
Thanks for flagging, I removed that A name record.
The code for the Museum as well as the Webamp player that powers the interactive preview can be found here: https://github.com/captbaritone/webamp
You can also find a blog post I wrote about the project here: https://jordaneldredge.com/winamp-skin-musuem/
The observation I'm trying to capture in this post is that even though we don't define a formal transition table, we actually _do_ implicitly define the set of valid (user) transitions for each state via the event handlers we bind into the DOM when our React component tree renders that state.
You can read more about how I ended up settling on docblocks here: https://grats.capt.dev/docs/faq/why-use-comments
https://x.com/captbaritone/status/1748020699263045659?s=46
Example project with this setup working can be found here: https://github.com/captbaritone/grats-relay-example
Unlike Pothos, this implementation-first approach is able to leverage simple type script names and types, whereas Pothos requires you to explicitly define all the names and types using their builder-pattern-for-graphql-SDL API.
More here on why Grats does not use decorators like type-graphql: https://grats.capt.dev/docs/faq/why-use-comments/
Often a code comment can be avoided (and clarity improved) by giving a name to an intermediate value rather than letting it be a nameless expression.
I like it! But I don't think of this a no-op code and would not imagine a lint rule objecting to it. That said, a code minifier (or compiler) would be well positioned to optimize that code, so you shouldn't even have to worry about even the thought of perf implications.
Just in time mentorship!