Not really a support question more of a discussion question just curious, it's a way of writing Discord menus with React - did a quick test with it on my bot I'm developing and holy cow it is such a nice way of making these UIs I got to delete a bunch of boilerplate code
Only downside is that the buttons don't continue to work after you restart which I'll have to use Sapphire interaction handlers for
Never heard of the library but the concept is familiar. It's really interesting how they make buttons stateful like this.
2411/29/2022
That guy who created the lib is also kinda cool
2411/29/2022
I wouldn't want to pull in react JUST for that though
Rhys11/29/2022
I suppose this is a factor but imo since you're not shipping your bot code to any clients it doesn't effect it too much right?
Rhys11/29/2022
Other than possibly longer build times on testing / CI / deployment
Favna11/29/2022
This tbh. Also React is very tiny. Only 330 KB @176457969465163776
Favna11/29/2022
It's the packages people install besides React that are large
2411/29/2022
True
Rhys11/29/2022
There's also Preact if it's a concern, although not sure if it'd work with this lib
2411/29/2022
Seems odd though
2411/29/2022
Just feels wrong
2411/29/2022
if that makes sense
Favna11/29/2022
I.e. if you use create react app that pulls in over 300 transient dependencies
2411/29/2022
CRA is a disgrace to humanity
Rhys11/29/2022
Oh yeah it feels wrong but works so well 😅
Rhys11/29/2022
I'd love it if this could handle button interactions between bot restarts, gonna take a peek into the code and see if that's possible at all
Rhys11/29/2022
Otherwise I'll just use it for ephemeral menus
Favna11/29/2022
Seeing as they use react state I'm guessing it's not. They'd have to probably add a Redis caching layer somehow.
Rhys11/30/2022
Yeah that makes sense, it looks like they make random GUIDs for the buttons when you make a component so what you could possibly do is introduce a stateless component concept purely for menus that don’t change
Rhys11/30/2022
And use static IDs for those
Rhys11/30/2022
At that point though I think it’s possibly over complicating things and you’re better off mixing it with something like sapphire for handling long running button interactions