Show newer

@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

@Laure it might not be supported by tech.lgbt… @david do you have the :trainsgender: over there? (it’s one of the mutant standard extras)

Lady boosted

It is not a made
up word, It brings up many
results in google,

i just want you to know that this is horrible

Show thread

god it doesn’t support `??` how outdated is this stack

Show thread

@aescling legitimately i think this entire frontend is built on top of a jenga tower of outdated babel transforms which can never be updated

arrow functions which have `this.props` in their body

how does this site… function

Show thread

there is something really horrifying happening in the glitchsoc frontend codebase

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)

Show thread

like it kinda sucks that your ||very important spoiler you *don’t* want people to see|| doesn’t actually get spoilered because you accidentally put an <em> tag in there

that’s unintuitive, but also i have no easy way of federating that <em> tag and it’s way easier to just only process text nodes

Show thread

it’s a bit of a problem how to handle spoiler tags which contain markup; right now i’m just Not Supporting Them. a Better solution would probably be to strip the markup but that is computationally much more difficult

Show thread
Show older
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.