Skip to content

Instantly share code, notes, and snippets.

@nabinno
Last active September 21, 2020 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nabinno/9b681ac90bfc6e9d3ea7433332ec42b1 to your computer and use it in GitHub Desktop.
Save nabinno/9b681ac90bfc6e9d3ea7433332ec42b1 to your computer and use it in GitHub Desktop.
「Reactのコンポーネント周りの用語を整理する」をシークエンス図で整理する - https://blog.ojisan.io/react-component-words
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@startuml
skinparam monochrome true
skinparam backgroundColor #EEEEEE
actor ReactText as RT
actor ReactChild as RC
actor ReactNode as RN
actor ReactElement as RE
actor "JSX\nElement\nConstructor" as EJC
actor "JSX.\nElement" as EJ
actor "Detailed\nReact\nHTML\nElement" as EH
actor "DOM\nElement" as ED
actor Component as C
actor "Function\nComponent" as CF
actor string as S
RT -|> RC
RC -|> RN
RN --> CF
CF --> RE: |型推論|\n子をpropsに必ずもち\nReactElementを返す
RN --> EH: |createElement()|\nReactNodeが引数
note bottom: createElement()\nの戻り
RE -|> ED
RE -|> EJ: HTMLへの描画として\nstringが手に入る
note bottom: {()=> <div/>}\nの戻り
S -|> RE
EJC <|--|> RE
ED -|> EH
EJC --> C
note bottom: + render()\n+ state()\n+ setState()
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment