Relax with React – Natasha Gitlin – Medium

Relax with React  #props #react #components #state #lifecycle #reactjs

  • With JSX, you pass a function as the event handler rather than a string.ComponentsReact is made up of container and presentational components or as Dan Abramov coined it, smart and dumb.
  • Presentational components are concerned with [how things look], receive data and callbacks with exclusively props and rarely have their own state.
  • Container components concerned with [how things work], provide application data and fetch data.
  • It is just another way of building an MVC framework where the presentational components are the views and container the controllers.LifecycleThe lifecycle of a component are customizable and goes through different phases when the components are in a state of change.
  • A prop supports or keeps something in position whereas a state is a condition that is susceptible to change.Before I dive right into my final project, I need to figure out the proper structure of my application.

I have made it to the final level. I’ve acquired the XP and skillset needed to ascend to the top and attain the apex of web development. Mind you, this is just the first hurdle in my programming…

Relax with ReactI have made it to the final level. I’ve acquired the XP and skillset needed to ascend to the top and attain the apex of web development. Mind you, this is just the first hurdle in my programming travels so I shan’t talk it up too much.Anyhow, I wanted to comb through a react-app and some terms that make up the framework. React is a single-page application in which we, the creators, are manipulating that single page to be dynamic and perpetually in a state of change.Declarative versus ImperativeReact is a declarative style of programming which allows you to control flow and state, as opposed to imperative which requires more details and a step-by-step approach. An example would be if you asked your friend to make you something for your birthday. A declarative way to ask your friend would be only describing what you want (i.e. a painting, drawing, sculpture) without you giving them a detailed blueprint on how they are going to tackle this request.EXAMPLE USING are some pay-offs with using this framework. You have more readable components that could be used again. Writing a React template is fairly similar to HTML with the convenience of JSX and makes it even more so by having it in your JS component code instead of in separate files. With JSX, you pass a function as the event handler rather than a string.ComponentsReact is made up of container and presentational components or as Dan Abramov coined it, smart and dumb. Presentational…

Relax with React – Natasha Gitlin – Medium