Skip to content

dikshagoyal26/React

Repository files navigation

https://browserslist.dev/

babel plugin transform remove console : https://babeljs.io/docs/en/babel-plugin-transform-remove-console/

parcel doesn't remove logs

render: loading something in dom

re-render:

es6, jsx, -> not mandatory

-> self closing tag

good notes app

react design principles

export default Title-> export Title by default default import -> import Title from "./Title" export const Title -> export by title named import -> import {Title} from "./Title" import * as Obj from ""

named import at 12:14 named export

react has one way data binding -

every component in react maintains a state you can put all variable in state local variables are put into state

state -> useState() hook

what is state? why?

  • local varibles

what is hook? why?

  • just a normal function

what is useUstate()? why?

  • to create local state variables
  • returns array, [variabble & a fn to update]

never call a component inside another component

hooks never write useState inside if else/ for loop never use useState outside a functional component

createBrowserROuter() function from react-router-dom. Helps us creating routing RouterProvider

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published