├── .all-contributorsrc ├── .github └── FUNDING.yml ├── LICENSE ├── README.md ├── chart.drawio ├── index.html └── screenshot.jpg /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "README.md" 4 | ], 5 | "imageSize": 100, 6 | "commit": false, 7 | "contributors": [ 8 | { 9 | "login": "Wavez", 10 | "name": "Gal Margalit", 11 | "avatar_url": "https://avatars.githubusercontent.com/u/2171199?v=4", 12 | "profile": "https://github.com/Wavez", 13 | "contributions": [ 14 | "code", 15 | "doc", 16 | "content", 17 | "maintenance", 18 | "design", 19 | "blog", 20 | "projectManagement", 21 | "review" 22 | ] 23 | }, 24 | { 25 | "login": "albseb511", 26 | "name": "Albert Sebastian", 27 | "avatar_url": "https://avatars.githubusercontent.com/u/12158859?v=4", 28 | "profile": "https://www.linkedin.com/in/albseb/", 29 | "contributions": [ 30 | "ideas", 31 | "bug", 32 | "question", 33 | "example" 34 | ] 35 | }, 36 | { 37 | "login": "eladcandroid", 38 | "name": "Elad Cohen", 39 | "avatar_url": "https://avatars.githubusercontent.com/u/13297000?v=4", 40 | "profile": "https://github.com/eladcandroid", 41 | "contributions": [ 42 | "bug" 43 | ] 44 | } 45 | ], 46 | "contributorsPerLine": 7, 47 | "projectName": "react-hooks-lifecycle", 48 | "projectOwner": "Wavez", 49 | "repoType": "github", 50 | "repoHost": "https://github.com", 51 | "skipCi": true 52 | } 53 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | 2 | github: Wavez 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Gal Margalit 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. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Maintenance](https://img.shields.io/maintenance/yes/2022) 2 | [![react versions supported](https://img.shields.io/badge/React%20versions%3A-Latest-success "React versions supported")]() 3 | [![GitHub stars](https://img.shields.io/github/stars/Wavez/react-hooks-lifecycle)](https://github.com/Wavez/react-hooks-lifecycle/stargazers) 4 | [![Twitter Follow](https://img.shields.io/twitter/follow/MargalitGal?label=Follow%20@MargalitGal&style=social)](https://twitter.com/MargalitGal) 5 | 6 | # React Hooks Lifecycle Diagram ⚛️ 🪝 ⏳ # 7 | [View the interactive diagram](https://wavez.github.io/react-hooks-lifecycle/) 8 | 9 | 10 | 11 | 12 | 13 | ## 💡 Functional components lifecycle explained ## 14 | 15 | This diagram is made using [draw.io](https://draw.io) 16 | and will be updated when react will introduce new hooks. 17 | 18 | This diagram was inspired by [Dan Abramov's tweet](https://twitter.com/dan_abramov/status/981712092611989509) (and its latter react [implementation](http://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/)) of the now "old" 👴 Class Components lifecycle. 19 | 20 | ## 📖 Further reading 21 | - [React hooks flow](https://github.com/donavon/hook-flow) 22 | - [React hooks API](https://reactjs.org/docs/hooks-reference.html) 23 | - [About this repo](https://medium.com/@galmargalit/react-function-components-hooks-lifecycle-diagram-14f76e0a5988) 24 | 25 | 26 | ## 🤗 Contributors 27 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification and its [emoji legend](https://allcontributors.org/docs/en/emoji-key). 28 | Contributions of any kind are welcome! 29 | Thanks goes to these wonderful people: 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |

Gal Margalit

💻 📖 🖋 🚧 🎨 📝 📆 👀

Albert Sebastian

🤔 🐛 💬 💡

Elad Cohen

🐛
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /chart.drawio: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React hooks lifecycle diagram 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 47 | 48 | 49 | 50 |
52 |
53 | 54 | 55 | -------------------------------------------------------------------------------- /screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wavez/react-hooks-lifecycle/e0d2d19142e74c9506f11aa55028f50b15a177d9/screenshot.jpg --------------------------------------------------------------------------------