Use Preact?
See original GitHub issueWould 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 š
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Preact | Preact: Fast 3kb React alternative with the same ES6 ...
Preact's tiny footprint means you can take the powerful Virtual DOM Component paradigm to new places it couldn't otherwise go. Use Preact to...
Read more >What is Preact and when should you consider using it?
Preact is a JavaScript library, claiming to be a āfast 3kB alternative to React with the same modern APIā. It is one, implementing...
Read more >preactjs/preact: āļø Fast 3kB React alternative with ... - GitHub
To get started using Preact, first look at the render() function. This function accepts a tree description and creates the structure described.
Read more >Practice Taking the ACT | PreACT | K12 Solutions
Anchored on the ACT college and career readiness standards, PreACT assessments help educators, students, and parents, identify areas of academic strength andĀ ...
Read more >Use Preact in Next.js 13 - DEV Community ā ā
Preact is a JavaScript library, considered the lightweight 3kb alternative of React with the same modern API and ECMA Script support. Preact hasĀ ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Spaghetti it is. Enjoy. š
Requires too much work. Never mind. If I could use it just on some features itād good, but typescript makes that impossible.