Comments (2)
There is a way of having this though, by using the babel plugin https://github.com/cristianbote/goober/tree/master/packages/babel-plugin-transform-goober#how-to-use. If you use something with a bundler should be quite easy to add.
Precisely about Proxy that's my main concern about ROI of adding 20-ish Bytes. For example there are entire features sets that are around ~6B so find the right balance somewhat in favour of both is pretty difficult. But in this case where you can use something else I don't think it's a must or a need for goober. But I am super opened and curious how you see it?
from goober.
I use normally Create-React-App, so going all with custom config/eject is not worth for a single line for me... I'd rather customize my code to have e.g. src/styled.js
be like this:
import { styled, setup } from 'goober';
setup(React.createElement);
export default new Proxy(styled, {...});
So the reason I think it's useful is because it's much more legible and virtually a standard in all other libraries, while adding "only" ~20B. I know in a library where size is the main reason those bytes are really important, so def would understand if you are against this, but I thought it's the "main way" goober is not there with all other styled components so I wanted to at least suggest it.
Basically if this and the default export were present, migrating from styled-components
to goober would virtually be changing "styled-components" for "goober" and adding a single setup() in index.js
in most of my codebases (except the very, very few components that have an .attr()
).
from goober.
Related Issues (20)
- extractCss() returns empty string in Solid SSR environment HOT 2
- The behavior of `glob()` was changed in 2.1.11.
- Support for concurrent rendering + server components HOT 8
- Replace babel with swc HOT 1
- How to put styles inside web component? HOT 1
- Have component names inside classnames when in dev mode HOT 2
- Help solve typescript error trying to add new prop and doing conditional style HOT 2
- How does goober compare to linaria? HOT 3
- Emotion is framework-agnostic
- Ability to set GOOBER_ID HOT 5
- [ Goober + Preact ] Error rendering during testing. HOT 2
- CSS string values do not work with extracted CSS HOT 4
- `css()` taken by surprise when `this` is `window` (in “old-school” JS environment) HOT 1
- Duplicated styles within dynamic classes
- Unexpected behaviour when extending components HOT 1
- Running prefixer for nested objects
- Usage with rollup HOT 1
- Shave challenge clarification: which file should we be looking at? HOT 2
- deno server-side-render error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goober.