⚠️ This lesson is retired and might contain outdated information.

What is JSX?

Chris Biscardi
InstructorChris Biscardi
Share this video with your friends

Social Share Links

Send Tweet
Published 4 years ago
Updated 2 years ago

JSX is a language extension to JavaScript for representing tree structures used heavily in the React ecosystem... but it's not only used with React!

Chris Briscardi: [0:00] JSX is used by a number of projects that represent tree structures in JavaScript. The JSX specification makes it clear that this is not a proposal to be included in X script itself, but rather is meant to be used by transpilers and compilers to compile into working JavaScript.

[0:15] One of the most common tree structures on the web is HTML, but JSX is often used to represent structures that end up rendering HTML. As shown in the spec, you can also use JSX for high order obstructions.

[0:28] As JSX is not tied to any particular framework, you can use it in any project you want. This is what allows projects like React and MDX to take advantage of JSX. React uses JSX to represent components, while MDX uses JSX as a target so that it can support not only React, but also Vue and other frameworks.

[0:48] While JSX is predominant approach, there are alternate paths being taken by frameworks such as FEL. Even frameworks such as Vue that support JSX can end up recommending a less powerful approach for most use cases in their documentation.

egghead
egghead
~ 5 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today