Skip to content

[labs/react] Add useController() hook#1532

Merged
justinfagnani merged 4 commits intomainfrom
lit-next-hook-controller
Apr 20, 2021
Merged

[labs/react] Add useController() hook#1532
justinfagnani merged 4 commits intomainfrom
lit-next-hook-controller

Conversation

@justinfagnani
Copy link
Copy Markdown
Collaborator

@justinfagnani justinfagnani commented Jan 13, 2021

Fixes #1531

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 13, 2021

📊 Tachometer Benchmark Results

Summary

nop-update

  • lit-html-kitchen-sink: unsure 🔍 -1% - +2% (-0.48ms - +0.69ms)
    this-change vs tip-of-tree

render

  • lit-element-list: unsure 🔍 -0% - +0% (-0.41ms - +0.32ms)
    this-change vs tip-of-tree
  • lit-html-kitchen-sink: unsure 🔍 -1% - +0% (-0.30ms - +0.08ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -1% - +0% (-0.11ms - +0.04ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -0% - +1% (-0.19ms - +0.64ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -1% - +0% (-0.89ms - +0.12ms)
    this-change vs tip-of-tree

update

  • lit-element-list: unsure 🔍 -1% - +0% (-4.77ms - +3.23ms)
    this-change vs tip-of-tree
  • lit-html-kitchen-sink: unsure 🔍 -0% - +4% (-0.37ms - +3.69ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -0% - +1% (-1.21ms - +3.70ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: slower ❌ 0% - 3% (0.05ms - 3.36ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -0% - +1% (-3.69ms - +6.16ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: unsure 🔍 -1% - +0% (-5.11ms - +3.67ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -1% - +1% (-7.01ms - +5.34ms)
    this-change vs tip-of-tree

Results

lit-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
90.71ms - 91.23ms-unsure 🔍
-0% - +0%
-0.41ms - +0.32ms
faster ✔
20% - 20%
22.14ms - 23.22ms
tip-of-tree
tip-of-tree
90.76ms - 91.27msunsure 🔍
-0% - +0%
-0.32ms - +0.41ms
-faster ✔
20% - 20%
22.10ms - 23.17ms
previous-release
previous-release
113.18ms - 114.12msslower ❌
24% - 26%
22.14ms - 23.22ms
slower ❌
24% - 25%
22.10ms - 23.17ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
784.86ms - 790.54ms-unsure 🔍
-1% - +0%
-4.77ms - +3.23ms
faster ✔
8% - 9%
67.93ms - 76.26ms
tip-of-tree
tip-of-tree
785.66ms - 791.28msunsure 🔍
-0% - +1%
-3.23ms - +4.77ms
-faster ✔
8% - 9%
67.17ms - 75.47ms
previous-release
previous-release
856.74ms - 862.83msslower ❌
9% - 10%
67.93ms - 76.26ms
slower ❌
8% - 10%
67.17ms - 75.47ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
862.82ms - 869.85ms-unsure 🔍
-1% - +0%
-5.11ms - +3.67ms
faster ✔
4% - 5%
35.97ms - 45.99ms
tip-of-tree
tip-of-tree
864.42ms - 869.68msunsure 🔍
-0% - +1%
-3.67ms - +5.11ms
-faster ✔
4% - 5%
35.83ms - 44.70ms
previous-release
previous-release
903.74ms - 910.89msslower ❌
4% - 5%
35.97ms - 45.99ms
slower ❌
4% - 5%
35.83ms - 44.70ms
-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
37.67ms - 37.96ms-unsure 🔍
-1% - +0%
-0.30ms - +0.08ms
faster ✔
16% - 17%
7.02ms - 7.57ms
tip-of-tree
tip-of-tree
37.80ms - 38.05msunsure 🔍
-0% - +1%
-0.08ms - +0.30ms
-faster ✔
15% - 16%
6.92ms - 7.46ms
previous-release
previous-release
44.88ms - 45.35msslower ❌
19% - 20%
7.02ms - 7.57ms
slower ❌
18% - 20%
6.92ms - 7.46ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
97.95ms - 100.74ms-unsure 🔍
-0% - +4%
-0.37ms - +3.69ms
unsure 🔍
-1% - +5%
-0.55ms - +4.76ms
tip-of-tree
tip-of-tree
96.21ms - 99.15msunsure 🔍
-4% - +0%
-3.69ms - +0.37ms
-unsure 🔍
-2% - +3%
-2.25ms - +3.15ms
previous-release
previous-release
94.97ms - 99.49msunsure 🔍
-5% - +1%
-4.76ms - +0.55ms
unsure 🔍
-3% - +2%
-3.15ms - +2.25ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
31.88ms - 32.90ms-unsure 🔍
-1% - +2%
-0.48ms - +0.69ms
unsure 🔍
-4% - +1%
-1.48ms - +0.44ms
tip-of-tree
tip-of-tree
32.00ms - 32.58msunsure 🔍
-2% - +1%
-0.69ms - +0.48ms
-unsure 🔍
-4% - +1%
-1.49ms - +0.24ms
previous-release
previous-release
32.10ms - 33.73msunsure 🔍
-1% - +5%
-0.44ms - +1.48ms
unsure 🔍
-1% - +5%
-0.24ms - +1.49ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
12.58ms - 12.64ms-unsure 🔍
-1% - +0%
-0.11ms - +0.04ms
faster ✔
13% - 14%
1.91ms - 2.01ms
tip-of-tree
tip-of-tree
12.57ms - 12.71msunsure 🔍
-0% - +1%
-0.04ms - +0.11ms
-faster ✔
13% - 14%
1.85ms - 2.01ms
previous-release
previous-release
14.54ms - 14.62msslower ❌
15% - 16%
1.91ms - 2.01ms
slower ❌
15% - 16%
1.85ms - 2.01ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
368.63ms - 372.38ms-unsure 🔍
-0% - +1%
-1.21ms - +3.70ms
faster ✔
27% - 28%
134.69ms - 143.69ms
tip-of-tree
tip-of-tree
367.68ms - 370.85msunsure 🔍
-1% - +0%
-3.70ms - +1.21ms
-faster ✔
27% - 28%
136.05ms - 144.82ms
previous-release
previous-release
505.60ms - 513.78msslower ❌
36% - 39%
134.69ms - 143.69ms
slower ❌
37% - 39%
136.05ms - 144.82ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
59.75ms - 60.32ms-unsure 🔍
-0% - +1%
-0.19ms - +0.64ms
faster ✔
21% - 22%
15.68ms - 17.18ms
tip-of-tree
tip-of-tree
59.50ms - 60.12msunsure 🔍
-1% - +0%
-0.64ms - +0.19ms
-faster ✔
21% - 23%
15.90ms - 17.41ms
previous-release
previous-release
75.77ms - 77.16msslower ❌
26% - 29%
15.68ms - 17.18ms
slower ❌
27% - 29%
15.90ms - 17.41ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
126.69ms - 129.70ms-slower ❌
0% - 3%
0.05ms - 3.36ms
faster ✔
17% - 19%
26.25ms - 30.16ms
tip-of-tree
tip-of-tree
125.81ms - 127.17msfaster ✔
0% - 3%
0.05ms - 3.36ms
-faster ✔
18% - 20%
28.49ms - 31.33ms
previous-release
previous-release
155.15ms - 157.64msslower ❌
20% - 24%
26.25ms - 30.16ms
slower ❌
22% - 25%
28.49ms - 31.33ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
64.65ms - 65.39ms-unsure 🔍
-1% - +0%
-0.89ms - +0.12ms
unsure 🔍
-1% - +1%
-0.64ms - +0.53ms
tip-of-tree
tip-of-tree
65.06ms - 65.75msunsure 🔍
-0% - +1%
-0.12ms - +0.89ms
-unsure 🔍
-0% - +1%
-0.25ms - +0.90ms
previous-release
previous-release
64.62ms - 65.54msunsure 🔍
-1% - +1%
-0.53ms - +0.64ms
unsure 🔍
-1% - +0%
-0.90ms - +0.25ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
800.23ms - 807.63ms-unsure 🔍
-0% - +1%
-3.69ms - +6.16ms
unsure 🔍
-1% - +1%
-4.90ms - +5.41ms
tip-of-tree
tip-of-tree
799.44ms - 805.95msunsure 🔍
-1% - +0%
-6.16ms - +3.69ms
-unsure 🔍
-1% - +0%
-5.82ms - +3.87ms
previous-release
previous-release
800.08ms - 807.26msunsure 🔍
-1% - +1%
-5.41ms - +4.90ms
unsure 🔍
-0% - +1%
-3.87ms - +5.82ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
905.16ms - 913.72ms-unsure 🔍
-1% - +1%
-7.01ms - +5.34ms
unsure 🔍
-1% - +1%
-6.51ms - +5.24ms
tip-of-tree
tip-of-tree
905.82ms - 914.73msunsure 🔍
-1% - +1%
-5.34ms - +7.01ms
-unsure 🔍
-1% - +1%
-5.81ms - +6.20ms
previous-release
previous-release
906.05ms - 914.10msunsure 🔍
-1% - +1%
-5.24ms - +6.51ms
unsure 🔍
-1% - +1%
-6.20ms - +5.81ms
-

tachometer-reporter-action v2 for Benchmarks

@justinfagnani justinfagnani force-pushed the lit-next-hook-controller branch from 3466ae3 to 6f1cc45 Compare January 27, 2021 04:27
@justinfagnani justinfagnani changed the base branch from lit-next to lit-next-labs-packages January 27, 2021 04:30
@justinfagnani justinfagnani marked this pull request as ready for review January 27, 2021 04:31
Base automatically changed from lit-next-labs-packages to lit-next January 28, 2021 01:37
@sorvell
Copy link
Copy Markdown
Member

sorvell commented Feb 25, 2021

@justinfagnani Can you rebase this against the current lit-next? That'll make it easier to review.

@justinfagnani justinfagnani force-pushed the lit-next-hook-controller branch from 6f1cc45 to 94450c0 Compare March 15, 2021 20:44
@justinfagnani justinfagnani changed the title [labs] WIP: useController hook in labs [labs/react] Add useController() hook Mar 15, 2021
@justinfagnani
Copy link
Copy Markdown
Collaborator Author

@sorvell this is all rebased and cleaned up now!

@justinfagnani justinfagnani requested a review from sorvell April 16, 2021 03:26
@justinfagnani justinfagnani merged commit fc8b7c2 into main Apr 20, 2021
@justinfagnani justinfagnani deleted the lit-next-hook-controller branch April 20, 2021 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[labs] Add reactive controller -> hooks adapter to labs

2 participants