sindresorhus/refined-github









The issue has been closed
Use Preact? #4058
fregante posted onGitHub
Would it make sense to drop dom-chef and just go straight to Preact?
Downsides:
- heavier (only +10/15 KB though)
- slower (given the amount of DOM change, how much really?)
- requires rewrite of many parts that aren't just
.append(<SomeJSX/>)
Upsides:
- no more type issues
- no more DOM spaghetti
- components that require DOM updates will be easier to handle
- ease of contribution since Preact is known and well documented, unlike the alternatives
- we can use
@primer/components
directly, which could reduce the amount of JSX we carry
We can try converting features gradually to test the feasibility and see what changes it brings. First from the simplest feature, then from a feature that would actually benefit from using Preact.
This will likely conflict with our existing JSX types, so we might have to clutter the codebase with ts-expect-error
or just add || true
in the build:typescript
npm script š