mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
This is a non-standard backwards-compatible feature that I suspect other tooling will soon adopt (and expect to help other tooling adopt it)
```jsx
var hello = {hi: 'yo'};
export const Foo = () => <Bar {hello.hi} />
```
Desugars into:
```jsx
var hello = {hi: 'yo'};
export const Foo = () => <Bar hi={hello.hi} />
```
This works with defines and macros too.
```jsx
export const Foo = () => <Bar {process.env.NODE_ENV} />
```
```jsx
export const Foo = () => <Bar NODE_ENV="development" />
```