Skip to main content

preact_basic_usage/
basic_usage.rs

1use use_preact::{PreactComponentName, PreactHookName, PreactJsxRuntime};
2
3fn main() -> Result<(), use_preact::PreactNameError> {
4    let component = PreactComponentName::new("AppShell")?;
5    let hook = PreactHookName::new("useSignal")?;
6
7    assert_eq!(component.as_str(), "AppShell");
8    assert_eq!(hook.as_str(), "useSignal");
9    assert_eq!(PreactJsxRuntime::Automatic.as_str(), "automatic");
10    Ok(())
11}