Skip to content

Fix forwardRef passing object instead of null#2567

Merged
marvinhagemeister merged 1 commit intomasterfrom
null-ref
Jun 1, 2020
Merged

Fix forwardRef passing object instead of null#2567
marvinhagemeister merged 1 commit intomasterfrom
null-ref

Conversation

@marvinhagemeister
Copy link
Copy Markdown
Member

Previously we'd always pass an empty object as the second parameter. To be able to differentiate a missing ref vs an unset ref we need to expand our createRef function unfortunately. I kinda loved that it did nothing before 🙈

Fixes #2566 .

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2020

Size Change: +67 B (0%)

Total Size: 39.7 kB

Filename Size Change
compat/dist/compat.js 3.2 kB +16 B (0%)
compat/dist/compat.module.js 3.23 kB +16 B (0%)
compat/dist/compat.umd.js 3.25 kB +17 B (0%)
dist/preact.js 3.87 kB +5 B (0%)
dist/preact.min.js 3.87 kB +5 B (0%)
dist/preact.module.js 3.88 kB +4 B (0%)
dist/preact.umd.js 3.93 kB +4 B (0%)
ℹ️ View Unchanged
Filename Size Change
debug/dist/debug.js 2.99 kB 0 B
debug/dist/debug.module.js 2.98 kB 0 B
debug/dist/debug.umd.js 3.08 kB 0 B
devtools/dist/devtools.js 184 B 0 B
devtools/dist/devtools.module.js 195 B 0 B
devtools/dist/devtools.umd.js 260 B 0 B
hooks/dist/hooks.js 1.09 kB 0 B
hooks/dist/hooks.module.js 1.1 kB 0 B
hooks/dist/hooks.umd.js 1.16 kB 0 B
test-utils/dist/testUtils.js 437 B 0 B
test-utils/dist/testUtils.module.js 439 B 0 B
test-utils/dist/testUtils.umd.js 515 B 0 B

compressed-size-action

Copy link
Copy Markdown
Member

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work!

@marvinhagemeister marvinhagemeister merged commit 78e27bd into master Jun 1, 2020
@marvinhagemeister marvinhagemeister deleted the null-ref branch June 1, 2020 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

forwardRef is always sending ref object

2 participants