dioxus/packages/core-macro
Evan Almloff 5024139e01
Detect components called as functions (#2461)
* detect components called as functions
* use the existing component name information instead of a thread local
2024-06-07 13:55:10 -07:00
..
.vscode Chore #2028: radically clean up core-macro 2024-03-09 01:09:20 -08:00
src Detect components called as functions (#2461) 2024-06-07 13:55:10 -07:00
tests Fix event handler memory leak (#2298) 2024-04-26 00:47:22 -04:00
Cargo.toml chore: Remove unused dependency (#2466) 2024-05-31 07:06:55 -05:00
CHANGELOG.md feat: add changelogs 2022-01-29 10:17:14 -05:00
README.md Fix Outdated README.md (#2147) 2024-03-26 19:17:02 -07:00

dioxus-core-macro

Crates.io MIT licensed Build Status Discord chat

Website | Guides | API Docs | Chat

Overview

dioxus-core-macro provides a handful of helpful macros used by the dioxus crate. These include:

  • The rsx! macro that underpins templates and node creation.
  • The component attribute macro denotes a function as a Dioxus component. Currently, this:
    • Transforms function arguments into an auto-derived struct.
    • Ensures that your component name uses PascalCase.
    • Probably more stuff in the future. This macro allows us to have a way of distinguishing functions and components, which can be quite handy.
  • The format_args_f macro which allows f-string formatting with support for expressions.

Contributing

  • Report issues on our issue tracker.
  • Join the discord and ask questions!

License

This project is licensed under the MIT license.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Dioxus by you shall be licensed as MIT without any additional terms or conditions.