use-preact 0.0.1

Preact component metadata primitives for RustUse
Documentation
  • Coverage
  • 48.39%
    15 out of 31 items documented1 out of 15 items with examples
  • Size
  • Source code size: 13.59 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 817.47 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s 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-preact

Preact component metadata primitives for RustUse.

Experimental

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

Example

use use_preact::{PreactComponentName, PreactHookName, PreactJsxRuntime};

let component = PreactComponentName::new("AppShell")?;
let hook = PreactHookName::new("useSignal")?;

assert_eq!(component.as_str(), "AppShell");
assert_eq!(hook.as_str(), "useSignal");
assert_eq!(PreactJsxRuntime::Automatic.as_str(), "automatic");
# Ok::<(), use_preact::PreactNameError>(())

Scope

  • Preact component, hook, JSX runtime, file-kind, and compat-mode metadata.
  • Lightweight component and hook name validation.

Non-goals

  • Rendering behavior.
  • JSX parsing.
  • Compatibility runtime behavior.

License

Licensed under either Apache-2.0 or MIT.