
May 5Article
Codex Ambassador: Q1 Recap Across 5 Cities
A short recap of Codex events in Berlin, Wroclaw, Warsaw, Sopot, and Miami, plus what we learned from each format and where we want to go next.
· Callstack
Linaria is a library which allows you to write CSS inside your JavaScript without the runtime cost.
The CSS is extracted out to plain old CSS files with the Babel preset, and critical CSS can be determined with the included helpers.
The idea for Linaria came from css-literal-loader and the syntax of styled-components. It also uses the same parser as styled-components. Glam by Sunil Pai has been another great source of inspiration.
The API looks like this:
| import { css } from 'linaria'; | |
| const title = css` | |
| text-transform: uppercase; | |
| font-weight: 300; | |
| &:before { | |
| border-left: 2px solid grey; | |
| } | |
| `; |
You write CSS syntax (plus nesting) in a tagged template literal and tag it with the css function from Linaria. It returns a class name for you to use. This gets optimized with the Babel preset which reduces it down to just a class name:
| const title = 'title_gdr45ky'; |
It’s possible to use JavaScript expressions inside the template literal and they will be evaluated at build time, useful for shared utility functions and constants:
| import { css } from 'linaria'; | |
| import { darken } from 'color'; | |
| import colors from './colors'; | |
| import media from './media'; | |
| const AVATAR_SIZE = 48; | |
| const avatar = css` | |
| background-color: ${darken(colors.placeholder, 10)}; | |
| height: ${AVATAR_SIZE}px; | |
| width: ${AVATAR_SIZE}px; | |
| border-radius: ${AVATAR_SIZE / 2}px; | |
| ${media('large')} { | |
| border-radius: 2px; | |
| } | |
| `; |
You can also compose multiple styles together with the include helper:
| import { css, include } from 'linaria'; | |
| const heading = css` | |
| font-family: Helvetica, sans-serif; | |
| `; | |
| const title = css` | |
| ${include(heading)}; | |
| font-weight: 300; | |
| `; |
which is equivalent to writing:
| import { css } from 'linaria'; | |
| const title = css` | |
| font-family: Helvetica, sans-serif; | |
| font-weight: 300; | |
| `; |
Why?
Existing CSS in JS libraries are pretty amazing as they provide several benefits over the traditional way of writing CSS, making it much more maintainable. They also come with its costs:
These costs may not be significant for all applications, and most of the time, it outweighs the benefits gained from CSS in JS.
The main goal of Linaria is to provide a similar level of flexibility and maintainability while not having the runtime cost associated with it.
It’s pretty similar, except a few key differences:
Despite the similarities, there are many differences between Linaria and the existing CSS in JS libraries:
When it comes to Emotion, there's a separate post on how Linaria differs from Emotion and styled components.
Want to give it a try? Check Linaria on GitHub, and don't forget to star it. We’re still actively working on it, so please report any issues you find. Pull requests are always welcome.
Insights

May 5Article
A short recap of Codex events in Berlin, Wroclaw, Warsaw, Sopot, and Miami, plus what we learned from each format and where we want to go next.

Feb 5Live Stream
Core Storybook concepts, stories and args, interaction testing, and how Storybook works in React Native projects.

Jan 29Article
Announcing the AI SDK Profiler plugin for Rozenite DevTools. Capture OpenTelemetry spans from the Vercel AI SDK and inspect AI requests across on-device and cloud providers.

Nov 28Talk
Learn how React Native DevTools work under the hood, and how to inject custom plugins with clean hooks and no forks.

Sep 16Talk
Learn how React Native DevTools work under the hood, and how to inject custom plugins with clean hooks and no forks.

Jul 28Article
Build custom debugging panels inside React Native DevTools with Rozenite: a modular, TypeScript-ready plugin framework with full device-scoped support.

Feb 12Article
Learn how to optimize React Native performance with Turbo and Nitro Modules. Ditch the legacy bridge and master modern native module development.

Dec 4Podcast
Find out how Radon IDE can help increase team velocity and rid you of the common React Native app development pain points.

Sep 19Podcast
Is Bun the future of React Native package management? Join us as we talk with Jarred Sumner, the creator of this lightning-fast JavaScript toolkit.

Sep 11Podcast
Discover the power of Vim, the legendary text editor, as we explore its origins, standout features, and practical tips to boost your coding efficiency.

May 15Article
At times you may need to create an add-on to use a web browser more effectively. Find out how to build one with React.

Jan 27Article
When you automate your dependency management, you can fully focus on developing your app. Find out how you can do it with autolinking.

Mar 19Tutorial
Learn how React Native AI uses a unified provider model to switch between cloud and on-device LLMs without rewriting application logic, enabling reliable AI experiences online and offline.

Mar 12Tutorial
Learn how on-device models in React Native can call tools, interact with external APIs, and return structured outputs you can use directly in application logic.

Mar 5Tutorial
Learn how to run third-party on-device LLMs in React Native using MLC LLM. Choose your models, run them efficiently across platforms, and keep a unified JavaScript API with React Native AI.

Feb 24Tutorial
Learn how to use Apple’s built-in Foundation Models in React Native apps, reduce memory usage, and enable fast, fully on-device AI with React Native AI Apple.

Feb 10Tutorial
Learn why on-device AI matters for React Native apps, how local LLMs behave offline, and what problems React Native AI is designed to solve from day one.

Jan 29Tutorial
Learn how to implement a React Native TurboModule on Android, from the TypeScript spec and Codegen to the Kotlin implementation and package registration.

Jan 19Tutorial
Learn how JavaScript, native module, background, and main threads interact in React Native TurboModules, and how to use GCD queues to run async work safely in Swift.

Jan 9Tutorial
Learn how to expose typed, immutable constants from a Swift TurboModule using Codegen, and get full end-to-end type safety between native and JavaScript.