Coder Social home page Coder Social logo

wojtekmaj / react-lifecycle-methods-diagram Goto Github PK

View Code? Open in Web Editor NEW
3.8K 52.0 315.0 5.17 MB

Interactive React Lifecycle Methods diagram.

Home Page: https://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/

License: MIT License

HTML 2.30% CSS 14.92% TypeScript 82.79%
react react-lifecycle diagram cheatsheet

react-lifecycle-methods-diagram's People

Contributors

ahangarha avatar alansyue avatar armin77 avatar beahuszar avatar chefk5 avatar codewithnitesh avatar dependabot[bot] avatar egorchh avatar eyesofkids avatar joristirado avatar laradeoliveira avatar lex111 avatar majedbojan avatar mareksuscak avatar mariuspop86 avatar movses avatar munierujp avatar nadabouzidi avatar nathanlschneider avatar nedolia avatar oerd avatar qc-l avatar r17x avatar rabbanirizwan avatar shenburak avatar shiralizadeh avatar smolinpavel avatar vidalpaul avatar wojtekmaj avatar yoshimii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-lifecycle-methods-diagram's Issues

"New props" arrow label is misleading

Motivation

I realize that the phrase "New props" is in the original tweet of Dan Abramov, but "new props" is vague and misleading. Further, it tends to reinforce the misconception mentioned in Brian Vaughn's blog post that the "Updating" swimlane is triggered only when the props "change" or are "different" ( "new" props suggests "different" from "old" props). As the blog post says "these lifecycles are called any time a parent component rerenders, regardless of whether the props are 'different' from before".

Proposal

Change the wording to say "parent rerenders" or something similar.

Aside

I'm not trying to be picky. Dan's diagram and your project have been infinitely helpful in aiding my understanding, yet I've continuously seen beginner, intermediate, and even some advanced React developers tripped up by this confusion. It's a small change, but if you agree, I can help out and do the PR as well.

useTranslation is being called way more than it should

useTranslation() gets called way too much. Between 350 and 450 times per screen. (it depends on the screen). Because it updates the state in a useEffect(), it gets re-rendered and called a few times.

It should be called way less often (below 35 times per screen).
You can easily see this by placing a console.log() in the main body of the useTranslation() function.

It would be great to have a title :)

Something like 'React lifecycle methods'.

When sharing the online version with other people if I don't tell them beforehand what's the link about, it's not so easy to understand what's the diagram about at first glance.

Show hooks

It would be nice to show where the callbacks in hooks are fired.

componentWillUnmount and refs to null?

I started to wonder, does React set all the refs to null before it calls componentWillUnmount or after?

However the diagram does not tell? Which one is it?

image

Change Arabic language flag in drop-down menu

The language drop-down menu shows Argentina flag for Arabic language. The reason is probably because of the value used for Arabic option is AR, which is ISO for Argentina flag emoji.
Suggested solution is to replace the language code to become AE or SA .

Bug when displaying less common lifecycles

When checking the checkbox do display the less common lifecycles, a bug happens and changes the name of some of the states to render. You can see this in the print below

image

Add Macedonian language

Macedonian language is missing and all of the docs are leading to the old documentation so I would like to update that.

"Chinese(Taiwan)" is incorrect! ⚠️

image

"Chinese(Taiwan)" is is incorrect. "Chinese(Traditional)" is right! Chinese language, only the difference between simplified Chinese and traditional Chinese, there is no difference between regions.

You should avoid possible political problems.

@wojtekmaj

Why not show china flag icon in language selection?

I saw that the Chinese flag 🇨🇳was specifically filtered out in the code and turned into the earth icon🌏 ,I feel this is very unfriendly,please remove the relevant filtering code immediately.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.