Skip to content

when mounting dynamic components, set ref if required#1280

Merged
Rich-Harris merged 2 commits intomasterfrom
dynamic-component-mount-ref
Mar 27, 2018
Merged

when mounting dynamic components, set ref if required#1280
Rich-Harris merged 2 commits intomasterfrom
dynamic-component-mount-ref

Conversation

@Conduitry
Copy link
Copy Markdown
Member

Refs to dynamic components weren't being set during mounting, only during updates. This fixes that and adds a test.

cc @heardy

@codecov-io
Copy link
Copy Markdown

codecov-io commented Mar 27, 2018

Codecov Report

Merging #1280 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1280      +/-   ##
==========================================
+ Coverage   91.51%   91.57%   +0.05%     
==========================================
  Files         121      121              
  Lines        4326     4330       +4     
  Branches     1361     1363       +2     
==========================================
+ Hits         3959     3965       +6     
  Misses        153      153              
+ Partials      214      212       -2
Impacted Files Coverage Δ
src/generators/nodes/Component.ts 95.93% <100%> (+1.04%) ⬆️
src/shared/utils.js 100% <0%> (ø) ⬆️
src/generators/dom/index.ts 96.06% <0%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcfbffe...6ff60db. Read the comment docs.

@Conduitry
Copy link
Copy Markdown
Member Author

I realized I'm not actually sure about addLine vs addBlock. Is this purely an aesthetic thing with whitespace in the generated code? I'm thinking probably this should be addBlock anyway though.

@Rich-Harris Rich-Harris merged commit 48643ca into master Mar 27, 2018
@Rich-Harris
Copy link
Copy Markdown
Member

Is this purely an aesthetic thing with whitespace in the generated code?

yeah. it's used inconsistently, and often results in weird spacing to be honest. there's probably a better way

@Rich-Harris Rich-Harris deleted the dynamic-component-mount-ref branch March 27, 2018 21:46
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.

3 participants