Giter VIP home page Giter VIP logo

Comments (4)

oliviertassinari avatar oliviertassinari commented on April 27, 2024

Browser support for Proxy looks good enough https://caniuse.com/?search=Proxy vs. our browser support target #40958.

It also looks better than https://github.com/emotion-js/emotion/blob/6e0e3880e2366dc4d14c293acac851fc73be730f/packages/styled/src/tags.js. I don't look forward to people asking: Where is <selectlist>, <model>, <search> 😅?

from material-ui.

joshwcomeau avatar joshwcomeau commented on April 27, 2024

Ah, so dot notation is already supported, and I believe it even uses Proxies! Sorry, I should have actually tried this before creating an issue 😅

from material-ui.

oliviertassinari avatar oliviertassinari commented on April 27, 2024

Oh, I didn't know as well, nice.

I dived a bit:

const Bubble = styled.span({
  height: 'var(--size, 100%)',
  aspectRatio: '1',
  background: 'radial-gradient(hsl(var(--h) 100% 70%) 25%, transparent 50%)',
  position: 'absolute',
  display: 'inline-block',
  left: 'var(--x, 0)',
  top: 'var(--y, 0)',
  scale: '0',
  translate: '-50% -50%',
  mixBlendMode: 'multiply',
  filter: 'blur(2px)',
  animation: `${scale} var(--s, 2s) var(--d, 0s) infinite alternate`,
});

is turned into this in the JavaScript bundle:

const Bubble = /*#__PURE__*/
(0,
_pigment_css_react__WEBPACK_IMPORTED_MODULE_2__.styled)("span")({
    classes: ["b1wnawl7"]
});
_c1 = Bubble;

by this logic:

if (callType === 'member') {
this.component = componentArg;
} else {

This is documented from https://github.com/Anber/wyw-in-js/blob/7cc243bb5c083d1fff0a44c5e0597374289d0684/apps/website/pages/how-to/custom-tagged-template.mdx#L40. So developers can use all future and past DOM elements.

cc @brijeshb42

from material-ui.

brijeshb42 avatar brijeshb42 commented on April 27, 2024

Yeah. This is supported though not through proxies but through static analysis.

from material-ui.

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.