use-react 0.0.1

React component and hook metadata primitives for RustUse
Documentation
  • Coverage
  • 50%
    12 out of 24 items documented1 out of 12 items with examples
  • Size
  • Source code size: 9.01 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 667.98 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-js
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-react

React component and hook metadata primitives for RustUse.

Experimental

use-react is experimental while use-js remains below 0.3.0.

Example

use use_react::{ReactComponentName, ReactHookName, ReactJsxRuntime};

let component = ReactComponentName::new("AppShell")?;
let hook = ReactHookName::new("useSession")?;

assert_eq!(component.as_str(), "AppShell");
assert_eq!(hook.as_str(), "useSession");
assert_eq!(ReactJsxRuntime::Automatic.as_str(), "automatic");
# Ok::<(), use_react::ReactNameError>(())

Scope

  • React component and hook name metadata.
  • JSX runtime and file-kind labels.

Non-goals

  • React runtime behavior.
  • JSX parsing or transforms.
  • Component rendering or project scaffolding.

License

Licensed under either Apache-2.0 or MIT.