reading-notes

reading notes for code fellows


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

Introduction to React and Components

As this will be my first time interacting with React/learning about components at all, this will be an important section to go over and understand before we jump into it since, as I understand, we will be using React quite a lot and it would be good to go in knowing something rather than nothing.

Component-Based Architecture

Component-based architecture focuses on the individual functions or components of a design that represent communication interface containing methods, events, and properties. It divides the problem into sub-problems, and its primary objective is to ensure component reusability.

Component - a modular, portable, replaceable, and reusable set of functionality/behaviors of a software element that becomes a self-deployable binary unit. A unit of composition with a contractually specified interface and explicit context dependencies.

Some standard component frameworks include

Component-oriented software design has advantages such as

A component can have three different views

Characteristics of components

A component-level design can be represented through inermediaries that can be translated into source code. The design of data structure, interface, and algorithm guidelines should help avoid errors. The principles of component-based design include

Component-level design guidelines create a naming convention for components specified as part of the architectural model and refine as part of the component-level model.

Conducting component-level design

1. What is a component?

a component is a replaceable and reusable set of code that can be made interchangeable and doesn’t rely on concrete data to work.

2. What are the characteristics of a component?

reusable, replaceable, not context specific, extensible, encapsulated.

3. What are the advantages of using component-based architecture?

Ease of deployment, reduced cost, ease of development, reusable, modification of technical complexity, reliability, system maintenance and evolution, independent.

What is Props and How to Use it in React

React is a component-based library that divides the UI into reuable pieces. Props(or properties) allows these components to communicate. All data passed through props goes uni-directionally and is read-only. To use props, define an attribute and its value, pass it to the child component, and render the props data.

interpolation {} defines attributes and assigns values in React.

You would pass arguments into a React component like this

const ChildComponent = (props) => {
  return <p>Many words</p>;
};

To render the value from props, you use string interpolation. Ex. {props.text}

1. What is props short for?

properties.

2. How are props used in React?

to pass data between components.

3. What is the flow of props?

uni-directional.

Things I Want to Know More About

[< table of contents]

[< home]