I was streaming recently and discussed how I implemented part of a graph I was building out.
The graph is interactive, where you can navigate ...
For further actions, you may consider blocking this person and/or reporting abuse
👋🏻 Nick
Loved your piece! 👏🏻
Just a quick tip: I looked at the PR and you can leverage Tailwind's group, data, focus and hover utilities to conditionaly apply styles, no JS needed.
Here's an example of something similar:
from github.com/tailwindlabs/tailwindcs...
Keep up the great work!
Cheers!
Check 'first', 'last' and the other modifiers too, they can help with a lot more 😄
tailwindcss.com/docs/hover-focus-a...
Nice! This is the first project I've used Tailwind in, so thanks for the tips!
Hope you enjoy Tailwind! You can DM me @constVinicius if you need help with those utilities 👷🏻♂️🛠
I love the creativity here. I do think, however, that calling data attributes a state management library is a bit of a stretch, as it lacks key built-in features like subscriptions and access everywhere. Just listening for a change in data attributes is hectic, requiring lots of boilerplate cruft using mutation observers and the such... the only straightforward way I can see this is with using web components, but managing other components' states are still wildly complicated, and thus I don't think it really solves the final state management problem as a whole. Thoughts?
Thanks for giving it a read @codingjlu!
It's definitely not a full-blown state management library. 😅 I was being cheeky/click baity by saying that.
The point was to more leverage what's in your browser for state when it makes sense, like the URL and data-attributes.
Got it, and I'm all for frameworkless stuff, so this resonates quite a bit. 👍
nice article
Thanks Amini!
Helpful article, thank you for putting it together and providing good context for how data attributes came into existence.
Thanks for the kind words Angie. Gald you liked it!