2. React 18 with TypeScript - JSX Syntax

Published: 28 October 2024
on channel: Miss Xing (邢老师)
232
7

‪@MissXing‬
In this video, we covered the details about JSX syntax inside React.

Don’t use quote when define JSX.
JavaScript Expressions: To insert dynamic data, variables, or expressions into the rendered content, curly braces {} inside JSX elements. You cannot use statements.
Class Name: Use the className attribute to set the CSS class of an element.
Inline Style: Use the style attribute to set inline style with syntax {{key:value}}.
Only One Top-Level Element: all elements within a JSX expression must be wrapped in a single parent element.
Must have closing tag. Be aware of Self-Closing Tags.
The first letter of a tag
If it’s lower case, it’ll be translated to HTML element with the same tag name. If couldn’t find in HTML, throw error.
If it’s upper case, react will render the component, if no component, throw error.
Comments: use syntax below. HTML comment not supported.
{/* THis is a comment*/}

Source code:
https://github.com/TinaXing2012/react


On this page of the site you can watch the video online 2. React 18 with TypeScript - JSX Syntax with a duration of hours minute second in good quality, which was uploaded by the user Miss Xing (邢老师) 28 October 2024, share the link with friends and acquaintances, this video has already been watched 232 times on youtube and it was liked by 7 viewers. Enjoy your viewing!