Git Product home page Git Product logo

Comments (2)

cristianbote avatar cristianbote commented on June 3, 2024

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.

franciscop avatar franciscop commented on June 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.