question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

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 šŸ˜…

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
fregantecommented, Mar 7, 2021

Spaghetti it is. Enjoy. šŸ

0reactions
fregantecommented, Mar 7, 2021

Requires too much work. Never mind. If I could use it just on some features itā€™d good, but typescript makes that impossible.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found