Let’s have a properly structured HTML and use react to enjoy performance and compatibility advantages. Realt has two basic ways to create HTML. React Let’s look at the first way to create an HTML element using the createElement function. Next is realct Hello world example overridden with createElement. The
https:\/\/codepen.io\/josh412\/pen\/qMazWb?&editors=0010 This function allows three arguments. The first is the type of the element. I passed \
The HTML attribute migration examples are passed to the empty object as the second parameter of createElement. This object contains the HTML attributes of the element. Let’s add the class and ID attributes to the list. https:\/\/codepen.io\/josh412\/pen\/gdLVJV?&editors=0010 The ID attribute is set by adding a key to the object in \
The attribute is also used to bind event handlers. In HTML, the onclick attribute can be passed to all elements. This is how realt works. For example, a button. https:\/\/codepen.io\/josh412\/pen\/MqJgWv?&editors=0010 In this case, you added the \
\
The problem is solved by associating a string with a plus operator. It works, but I want to use the template language. For example, JSX. Let’s look at: https:\/\/codepen.io\/josh412\/pen\/yxadyw?&editors=0010 What does JSX do? JSX is actually react. Another syntax for createElement. Building tools such as webpack or parkel are realt. When compiling JSX using the createElement function. JSX is realct. Shortcut to createElement. Without it