#what is the trait that #[derive(Props)] satisfies?
4 messages · Page 1 of 1 (latest)
I'm also new, but have been doing a lot digging lately on macros and dioxus.
https://github.com/DioxusLabs/dioxus/blob/master/packages/core-macro/src/lib.rs#L31-L38
This is where the props macro seems to be defined. Most of the logic for it is in the impl_my_derive function here: https://github.com/DioxusLabs/dioxus/blob/master/packages/core-macro/src/props/mod.rs#L16-L64 .
I've also found it incredibly useful to have rust_analyser enabled on your IDE. Then you can click on the Props in #[derive(Props)] and type Expand macro recursively, it may take a while, but it expands your prop into what the macro would generate. It's implementing a whole host of things - try it on a simple prop to see a 'simpler' definition of it
@opal pulsar I think following it through, I get to this trait: https://github.com/DioxusLabs/dioxus/blob/c18f91142937937a32708d9f9c9294cf249e9d76/packages/core/src/properties.rs#L35-L52
Properties! makes a lot of sense. It's working, thanks for the help!!