Section 26: Create React App and Props Flashcards

1
Q

Webpack

A

A module bundler for modern JavaScript applications

  • Combines different JS files into a bundle.js
  • Has plugin system to run tools like babel
  • Also bundles other assets like css, images, etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

React Props

A

immutable data passed to your components. They are accessible in your component as an object called this.props

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

defaultProps

A

*provides a default so that the rest of your code doesn’t break because it’s undefined.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

static defaultProps

A

*This way it is static an doesn’t get created multiple times. ** I think?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

propTypes

A

*Development time checker for your props. Only works on development mode. Used to check for mistakes in the code.

Installation:
npm install –save prop-types

*Used to alert when there’s a bug floating around in development.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly