-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Better Function Component in docs + Macro-based Hooks #2478
Conversation
Visit the preview URL for this PR (updated for commit db3324d): https://yew-rs-api--pr2478-fn-comp-2-part-2-mhkhgqv9.web.app (expires Sun, 13 Mar 2022 05:09:58 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
@futursolo can you update this PR now that #2330 has been merged? |
…2-part-2 # Conflicts: # packages/yew/src/dom_bundle/app_handle.rs # packages/yew/src/html/component/scope.rs # packages/yew/src/lib.rs # packages/yew/src/server_renderer.rs # packages/yew/src/virtual_dom/listeners.rs # packages/yew/src/virtual_dom/vcomp.rs # packages/yew/src/virtual_dom/vnode.rs # tools/process-benchmark-results/src/main.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of comments. Not blocking but I would like to have them fixed before merging.
One question though: Was BaseComponent
not enough that we need to introduce SealedBaseComponent
and IntoComponent
? What was wrong with BaseComponent
?
PS: I updated the PR description to say "Closes #issue" so the PR is closed on merge
m.path | ||
.get_ident() | ||
.and_then(|ident| match ident.to_string().as_str() { | ||
"doc" | "allow" => Some(m.clone()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should pass deny
and warn
. if we're passing along allow
, or does it not matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably shouldn't. This makes users to be able to apply lints on generated code.
Lints are usually suppressed on generated code.
Sealing In addition, I think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Fixes #2144
Closes #2435 (supersedes it)
use_style!(r"color: red;")
#[allow]
and#[doc]
are now copied to outer struct.SealedBaseComponent
.AttrValue
is now prelude.Checklist
cargo make pr-flow
(pr-flow is broken on macOS #2403)