├── .gitignore
├── LICENSE.MD
├── README.md
├── index.html
├── package-lock.json
├── package.json
├── src
├── components
│ ├── app.js
│ ├── discussion.js
│ ├── navigation.js
│ ├── page-content.js
│ ├── rules.js
│ └── workflow.js
└── index.js
├── style
└── main.css
└── webpack.config.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 |
--------------------------------------------------------------------------------
/LICENSE.MD:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 DevCamp, LLC
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # React Component Lifecycle Deep Dive
2 |
3 | ## Topics covered
4 |
5 | - React router dom
6 | - Class vs function components
7 | - Object deconstruction
8 | - Component lifecycle methods
9 |
10 | ### Component Life Cycle methods
11 |
12 | [Docs](https://reactjs.org/docs/react-component.html)
13 |
14 | **Mounting**
15 |
16 | *These methods are called when an instance of a component is being created and inserted into the DOM:*
17 |
18 | - constructor()
19 | - static getDerivedStateFromProps()
20 | - componentWillMount()
21 | - render()
22 | - componentDidMount()
23 |
24 | * * *
25 |
26 | **Updating**
27 |
28 | *An update can be caused by changes to props or state. These methods are called when a component is being re-rendered:*
29 |
30 | - componentWillReceiveProps()
31 | - static getDerivedStateFromProps()
32 | - shouldComponentUpdate()
33 | - componentWillUpdate()
34 | - render()
35 | - getSnapshotBeforeUpdate()
36 | - componentDidUpdate()
37 |
38 | * * *
39 |
40 | **Unmounting**
41 |
42 | *This method is called when a component is being removed from the DOM:*
43 |
44 | - componentWillUnmount()
45 |
46 | * * *
47 |
48 | **Error Handling**
49 |
50 | *This method is called when there is an error during rendering, in a lifecycle method, or in the constructor of any child component.*
51 |
52 | - componentDidCatch()
53 |
54 | * * *
55 |
56 | > Provided for the students of the [Bottega Code School](https://bottega.tech/)
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |