@aescling @alyssa no, the arrow functions are being defined using = inside a class declaration, so the context is the constructed instance (instance fields are defined after the call to `super()` in the constructor iirc)
like
class Blah extends React.Component {
yep = () => {}
}
is doing
class Blah extends React.Component {
constructor() {
super()
this.yep = () => {}
}
}
@alyssa it's very cursed imo for arrow functions to refer to `this` when they don't appear inside a different non-arrow function whose `this` they are inheriting, but this is apparently normal for React
@aescling i liked it better when i didn’t know
@aescling oh i figured it out and it’s cursed
@aescling legitimately i think this entire frontend is built on top of a jenga tower of outdated babel transforms which can never be updated
maybe instead of doing a discord‐style ||spoiler|| i should just do a custom elements‐style <spoiler-text> as that would at least make stripping internal markup easier (and also be easier to support in html)
Administrator / Public Relations for GlitchCat. Not actually glitchy, nor a cat. I wrote the rules for this instance.
“Constitutionally incapable of not going hard” — @aescling
“Fedi Cassandra” – @Satsuma
I HAVE EXPERIENCE IN THINGS. YOU CAN JUST @ ME.
I work for a library but I post about Zelda fanfiction.
For the time being, this is mostly a mirror of <https://status.ladys.computer/>. Want to get in touch? E·mail me!