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

Turn #[make_rx] into #[derive(ReactiveState)] #237

Merged
merged 6 commits into from
Nov 25, 2022

Conversation

arctic-hen7
Copy link
Member

This removes the attribute macro #[make_rx] and replaces it entirely with #[derive(ReactiveState)], which achieves the exact same ends, using a derive macro. This allows for more sensible placement of the #[rx(nested)] helper macro over nested fields, while also matching neatly with the new UnreactiveState derive macro. Overall, this contributes to improved ergonomics.

This of course involves several breaking changes.

@arctic-hen7
Copy link
Member Author

Note that the name of the reactive version of state is now specified with the #[rx_alias = "..."] helper macro, and this provides a simple type alias. Due to greater type linkage, the underlying hidden types need never be interacted with.

@arctic-hen7
Copy link
Member Author

CI appears to be broken at the moment. Along with #238, I am merging this without test validation, and any errors will be sorted out in a separate PR. (I'll try to fix CI on main.)

@arctic-hen7 arctic-hen7 merged commit 8ec2d6f into main Nov 25, 2022
@arctic-hen7 arctic-hen7 deleted the feat-make-rx-derive-macro branch November 25, 2022 22:45
arctic-hen7 added a commit that referenced this pull request Nov 25, 2022
arctic-hen7 added a commit that referenced this pull request Nov 25, 2022
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.

None yet

1 participant