Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default Unit property on Component #431

Merged
merged 2 commits into from
Jun 8, 2022

Conversation

mc1098
Copy link
Contributor

@mc1098 mc1098 commented Jun 8, 2022

Removes the default () unit property when no properties are
specified in the Component definition.

Removes the above assumption in the view macro codegen.
Removes the UnitBuilder struct and Unit prop impl from sycamore-core.

Fixes #415

mc1098 added 2 commits June 8, 2022 13:33
Removes the adding of a default `()` unit property when none are
specified in the Component definition.

Fixes the above assumption in the `view` macro codegen.
@codecov
Copy link

codecov bot commented Jun 8, 2022

Codecov Report

Merging #431 (fbf35f4) into master (5f58fe3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #431   +/-   ##
=======================================
  Coverage   64.96%   64.97%           
=======================================
  Files          52       52           
  Lines        8278     8268   -10     
=======================================
- Hits         5378     5372    -6     
+ Misses       2900     2896    -4     
Impacted Files Coverage Δ
packages/sycamore-core/src/component.rs 68.18% <ø> (+10.48%) ⬆️
packages/sycamore/src/builder.rs 23.11% <ø> (ø)
packages/sycamore-macro/src/component/mod.rs 95.95% <100.00%> (-0.07%) ⬇️
packages/sycamore-macro/src/view/codegen.rs 96.22% <100.00%> (-0.03%) ⬇️

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 5f58fe3...fbf35f4. Read the comment docs.

@lukechu10
Copy link
Member

Looks great thanks! Not sure why I did that in the first place but it's definitely cleaner now.

@lukechu10 lukechu10 merged commit 215a015 into sycamore-rs:master Jun 8, 2022
@mc1098 mc1098 deleted the fix-default-unit-prop branch June 8, 2022 14:37
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.

E0061 when trying to call a component without props in Builder API
2 participants