reading-notes

My reading journal for Code Fellows.


Project maintained by mattlarkin8 Hosted on GitHub Pages — Theme by mattgraham

Introduction to React and Components

Component-Based Architecture

What is a “component”?

A component is a software object that is modular, portable, replaceable, reusable, and interacts with other components to provide a certain functionality.

What are the characteristics of a component?

Components are:

What are the advantages of using component-based architecture?

Components offer many advantages including reduced cost, ease of development and deployment, reusability, reliability, and independence.

What is Props and How to Use it in React

What is “props” short for?

Props is short for properties and is used to pass data between components.

How are props used in React?

In React, props are used to define an attribute and its corresponding data. The usage is very similar to passing arguments into a function in JavaScript. This allows you to have one component produce different results based on the content you passed it using props.

What is the flow of props?

Props data is read-only and they can only be passed from a parent to a child component. This means the child can’t alter the data passed to it and props do not open some kind of communication channel between components.

Things I want to know more about

I look forward to getting practice using props. The comparison to function parameters/arguments really helped me understand the concept of its use. I feel like once I start using it more, I will really get a good understanding of how it works.