Those Curly Braces in JSX

Last Updated:
jsx-braces

In JSX, { } is a placeholder waiting to be filled. You can put in many things, a number, a string, an object or even a function. What you can put inside is an Expression.

Since it’s an expression, it can go pretty crazy. In fact, there’s no limit of what you can put inside. As long as it’s an expression, it’ll fit....

jsx-complex

Sometimes you can even put a JSX tag inside the { }, because JSX tags are Expressions too!

jsx-in-jsx

Visits: 0
Discuss on Twitter

I hope you find this article useful!

One of my 2021 goals is to write more posts that are useful, interactive and entertaining. Want to receive early previews of future posts? Sign up below. No spam, unsubscribe anytime.