partytown
twin.macro
Our great sponsors
partytown | twin.macro | |
---|---|---|
65 | 57 | |
12,673 | 7,802 | |
1.6% | - | |
8.4 | 6.1 | |
about 17 hours ago | 20 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
partytown
- Partytown: Run Third-Party Scripts from a Web Worker
-
Lessons from open-source: Partytown — a library that uses web worker to run third party scripts.
Partytown is a lazy-loaded library to help relocate resource intensive scripts into a_ web worker, and off of the main thread. Its goal is to help speed up sites by dedicating the main thread to your code, and offloading third-party scripts to a web worker. — Source
-
Frontend development roadmap
Research Frameworks and Tools - Make sure to do your research on your current javascript framework and find out if it has a superset (eg React ->Nextjs, Svelte -> Sveltekit, Vue->Nuxtjs). They often come with many improvments and optimizations out of the box. There are also tools like Partytown which can vastly improve performance in some specific cases
-
Interaction to Next Paint (INP)
has anyone had any luck with partytown?
https://partytown.builder.io/
-
Problems to be solved
It’s probably the insane amount of third party scripts like tracking and much more. Give partytown a try, might help you in the short run: https://partytown.builder.io
- Leftovers AI - meal generator
-
Found a great way to handle cookies and render blocking scripts
I assume you’re talking about https://partytown.builder.io/ — looks great! Only difference is not having a built in GDPR pop up, but that’s ok.
- How the heck should i reduce page speed of a react website?
- [Rant] If I get sent one more report about pages performing poorly I'm going to lose my mind....
- Partytown: a library to run heavy third-party scripts (e.g. analytics) inside a web worker
twin.macro
-
Tailwindcss in Styled-Components
Twin Macro Github Repo. This is a great resource to help you pick up Twin’s syntax, learn more about the package, and keep up to date with the latest releases.
-
CSS Style Guide for Web Dev?
Personally I like twin.macro the most. It’s similar to the above but based on Tailwind.
-
Cool Tailwindcss Tools For Everyone
twin.macro is a library that allows you to use these styles in your JavaScript code. This library works exactly like styled-components.
- How do you css?
-
Fixing Class Composition in Tailwind CSS
One of the more promising alternatives is twin.macro - a Babel macro that processes Tailwind classes to generate JS objects understandable by various CSS-in-JS libraries. The developer experience (DX) of using it is amazing as you not only get all of Tailwind’s features without much change to your code, but you also get much more flexibility - all that on top of the traditional benefits of CSS-in-JS. Here’s an example code:
-
Setup Nextjs Tailwind CSS Styled Components with TypeScript
twin.macro
-
What unpopular webdev opinions do you have?
If you use Tailwind with React a lot, and are wanting support for Styled Components, give Twin Macro a look. They're close to finishing support for TW v3 in their Releases section :)
- Are utility classes horrible design or am I dumb?
- What's the proper way to write Tailwind with React?
-
Stailwc: an swc plugin for transpiling tailwind directives at compile time
The blocker for us using it is our use of an excellent library called twin.macro which is built against babel's transpilation APIs to parse tailwindcss directives at compile time so that they may be used with css-in-js libraries. This efficiently bundles your css so that you only ship the precise css you use. The problem is, it's all quite slow.
What are some alternatives?
parallel.js - Easy multi-core processing utilities for Node.
twind - The smallest, fastest, most feature complete Tailwind-in-JS solution in existence.
comlink - Comlink makes WebWorkers enjoyable.
Tailwind CSS - A utility-first CSS framework for rapid UI development.
Angular - Deliver web apps with confidence 🚀
tailwindcss-classnames - Functional typed classnames for TailwindCSS
Next.js - The React Framework
jest-styled-components - 🔧 💅 Jest utilities for Styled Components
qwik - Instant-loading web apps, without effort
vue-emotion - Seamlessly use emotion (CSS-in-JS) with Vue.js
mitosis - Write components once, run everywhere. Compiles to React, Vue, Qwik, Solid, Angular, Svelte, and more.
tailwind-safelist-generator - Tailwind plugin to generate purge-safe.txt files