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

Generic functional components #1756

Merged
merged 18 commits into from
Feb 24, 2021

Conversation

lukechu10
Copy link
Contributor

@lukechu10 lukechu10 commented Feb 23, 2021

Description

Implements parsing and expansion for generic #[function_component] components.

Fixes #1739

Checklist

  • I have run cargo make pr-flow
  • I have reviewed my own code
  • I have added tests

@lukechu10 lukechu10 marked this pull request as ready for review February 23, 2021 03:20
@github-actions
Copy link

github-actions bot commented Feb 23, 2021

Visit the preview URL for this PR (updated for commit 014ccec):

https://yew-rs--pr1756-lukechu10-function-c-snu53uqz.web.app

(expires Tue, 02 Mar 2021 23:13:12 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@siku2
Copy link
Member

siku2 commented Feb 23, 2021

Is this still a draft? There are a lot of TODO comments left.

Btw, please update your "pass" tests such that they bring as few members as possible into scope.
For reference.

This helps ensure that the macro code is (and more importantly stays) hygienic.

@siku2 siku2 added the macro Issues relating to our procedural or declarative macros label Feb 23, 2021
@lukechu10 lukechu10 marked this pull request as draft February 23, 2021 16:44
@lukechu10
Copy link
Contributor Author

lukechu10 commented Feb 23, 2021

Yeah, I'll try to improve the error messages some more as well as the pass test :)

@lukechu10
Copy link
Contributor Author

I also want to try this out with const generics

@lukechu10
Copy link
Contributor Author

Ok, const generics seem to be working. I can't enable it in the CI tests because it is not in stable yet.

@lukechu10 lukechu10 marked this pull request as ready for review February 23, 2021 18:37
@lukechu10
Copy link
Contributor Author

Everything seems to be working now :)

Copy link
Member

@siku2 siku2 left a comment

Choose a reason for hiding this comment

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

The implementation looks solid 👍

@lukechu10 lukechu10 requested a review from siku2 February 24, 2021 16:19
@siku2 siku2 merged commit ee8eae1 into yewstack:master Feb 24, 2021
@lukechu10 lukechu10 deleted the lukechu10/function-component-generics branch February 24, 2021 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macro Issues relating to our procedural or declarative macros
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support generic functional components
2 participants