Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 999 Bytes

README.md

File metadata and controls

22 lines (15 loc) · 999 Bytes

react-notes

  1. javascript cannot run without script in html.

  2. SPA - single page applications react only has a single html file(SPA) in which whole javascript is injected BTS with the help of react scripts.

  3. function name should be capatalised and file name starting with a capital letter is a best prictise.

  4. ReactDOM crate a new dom of itself which is also k/a virtual dom

  5. {expression} - evaluvated expression

  6. const reactEle = React.createElement(htmlelement,{attributes of element if any in key value pairs},children, evaluated expression) -to create a cutomReact element, it uses babble bundler

  7. React controls the UI updation that why we need HOOKS

  8. props help in making components reusable

  9. copy functionality - window.navigator.clipboard.writetext()

  10. REACT ROUTER DOM- Link{href = to} - it is used insted of anchor tag because when anchor tag is clicked it refreshed whole html doc and we dont want that in react. NavLink -