New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Introducing JSX" is missing a step #794

Closed
gaearon opened this Issue Apr 11, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@gaearon
Member

gaearon commented Apr 11, 2018

Between first and second example, we're missing a simpler step where we just show something like

var name = 'Josh Perez';
var hello = <h1>Hello, {name}</h1>

Otherwise the gap between the first and the second example is too large, and people fall off.

@joelbarbosa

This comment has been minimized.

joelbarbosa commented Apr 12, 2018

Do you think to put after the first example?

const element = <h1>Hello, world!</h1>;

like:

.....
It is called JSX, and it is a syntax extension to JavaScript. We recommend using it with React to describe what the UI should look like. JSX may remind you of a template language, but it comes with the full power of JavaScript.

var name = 'Josh Perez';
var hello = <h1>Hello, {name}</h1>

JSX produces React “elements”. We will explore rendering them to the DOM in the next section. Below, you can find the basics of JSX necessary to get you started.

If so, I can do that.

@gaearon

This comment has been minimized.

Member

gaearon commented Apr 12, 2018

Something like this. Send it and we'll iterate!

@stmoreau

This comment has been minimized.

Contributor

stmoreau commented Apr 16, 2018

@joelbarbosa are you still working on that? if not, I am willing to do it.

@joelbarbosa

This comment has been minimized.

joelbarbosa commented Apr 16, 2018

@stmoreau ok. You can assume then.

@stmoreau

This comment has been minimized.

Contributor

stmoreau commented Apr 17, 2018

@gaearon

This comment has been minimized.

Member

gaearon commented May 9, 2018

Fixed by #812

@gaearon gaearon closed this May 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment