React Course.
New learning points
1. Import images with relative path because while production building (optimization),
Folder structure changes so that a time path is not found.
2. When adding events to elements, such as onClick props, react run functions are
there responsibility.
Syntax: onClick={clickhandle}; ✅
Note that we cannot call itself because when a component renders, it automatically
invokes
Syntax: onClick={clickhandle()} ❌.
ReactJS Essientials.
● Structured components.
● Jsx.
● State managements.
● Dynamically update content using the useState, ternary
operator.
● Dynamically adding attributes. E.g. style.
● Events handling.
React doesn't need JSX, but it's convenient.
React build process converts jsx code into browser
understandable code.
<div id=”active” >Hello World !</div>
Without jsx : React.createElement(
“Div”,
{id=”active”},
“Hello world !”)
Fragments (<></>)
Actuly i don't understand why you create another <Tab/> component. I think it has become
unnecessary component rendering, and at the end we will make all changes in <Example/>
component. So please explain me this scenario if its wrong.