Awakening

Awakening 

"Awakening" is a song by Starlight Passage. It has made it onto my modified Coding Mode playlist on Spotify. 

I am not sure whether it was on the original Spotify Coding Mode playlist or not.

Today I am having a hard day. Today a lot of memories are coming up for me. Today a lot of visions are coming up for me. Visions of the place that I call home, and what I miss so much.

A Google maps screenshot of a place that I LOVE. 45 minutes or so walk from home.

A Very Brief History of JSX

One way in which JSX is described...

... is as allowing you to write HTML inside of JavaScript. However, JSX is not a mix of HTML and JavaScript (!!!). Apparently, it is "plain JavaScript with some clever syntax that makes it easier to represent HTML". Wait, what??! It looks like a mix of HTML and JavaScript to me!!! 💖

For example: JSX "allows you to jump in from writing code that looks almost like HTML to code that pretty much is HTML. Later, that pseudo-HTML code is transpiled down to the regular JavaScript that browsers understand.".

Who invented JSX?

Like React, JSX was also invented by the Facebook team. However, unlike React, JSX is concerned only with syntax. You can use React without JSX - and JSX without React. Although JSX WAS created by the team at what is now Meta, it has been adopted by multiple web frameworks.

Syntactic Sugar

Some sources describe JSX as being "syntactic sugar" for the React.createElement(component, props, ...children) function.

It all just complies down into basic JavaScript anyway.

Templates As Functions

JSX "embraces the idea that templates are just functions. They take data as input, and they output a structured, visual representation of that data".  As the templates that we create in JSX compile down into functions in JavaScript anyway, they are well suited to be living in the JavaScript code.

Something called "Babel" can transpile JSX into libraries which aren't React anyway.

Comments

Popular posts from this blog

Hello World

Yosemite

Two Lines of Thought, Makes Me Wonder What I'm Missing