Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Advanced React] 02. Elements, Children, Re-renders #72

Open
reboottime opened this issue Apr 27, 2024 · 3 comments
Open

[Advanced React] 02. Elements, Children, Re-renders #72

reboottime opened this issue Apr 27, 2024 · 3 comments

Comments

@reboottime
Copy link
Owner

reboottime commented Apr 27, 2024

Element, Children, and rerenders

This article is part of an advanced React series tutorials.

Major content




Address the root cause

@reboottime
Copy link
Owner Author

reboottime commented Apr 27, 2024

The Problem

  • Sympton
image
  • Codebase
image

@reboottime
Copy link
Owner Author

reboottime commented Apr 27, 2024

Fundamentals

Component VS Element

  • Component: The template to create an element

  • Element: an object, React.createElement(Child, null, null)

  • Go to element detail

    • Type

      • Type as component
      image
      • Type as string
      image


Rendering process

  • Tree structure
image
  • When mounting happens
image

Re-rendering Process

  • Diff and reconciliation intro: true? skill re-render,
image image
image
  • Solution

    • Problem causing one
    image
    • Problem solving one
    image image

@reboottime
Copy link
Owner Author

reboottime commented Apr 27, 2024

Solution

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant