Skip to content

Commit

Permalink
Updated OVERVIEW.dm to account for Bridge protocol changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Dec 9, 2021
1 parent c06012b commit 555e871
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/react-devtools/OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ Adding a root to the tree requires sending 5 numbers:
1. add operation constant (`1`)
1. fiber id
1. element type constant (`11 === ElementTypeRoot`)
1. profiling supported flag
1. root has `StrictMode` enabled
1. supports profiling flag
1. supports `StrictMode` flag
1. owner metadata flag

For example, adding a root fiber with an id of 1:
Expand Down Expand Up @@ -178,6 +180,20 @@ Special case of unmounting an entire root (include its descendants). This specia

This operation has no additional payload because renderer and root ids are already sent at the beginning of every operations payload.

#### Setting the mode for a subtree

This message specifies that a subtree operates under a specific mode (e.g. `StrictMode`).

```js
[
7, // set subtree mode
1, // subtree root fiber id
0b01 // mode bitmask
]
```

Modes are constant meaning that the modes a subtree mounts with will never change.

## Reconstructing the tree

The frontend stores its information about the tree in a map of id to objects with the following keys:
Expand Down

0 comments on commit 555e871

Please sign in to comment.