"#;
let react_html = convert_props_react(html.to_string());
println!("{}", react_html);
//
}
```
## Convert HTML to a full React component
`convert_to_react` takes the HTML string and a component name and returns a
complete React component:
```rust
extern crate htr;
use htr::convert_to_react;
/// convert html to react component
fn main(){
let html = r#"
"#;
let react_component = convert_to_react(&html.to_string(), "Something");
println!("{}", react_component);
// import React from "react"
//
// function Something() {
// return (
// <>
//
//
//
// >
// )
// }
}
```
## Input / output format
- **Input**: raw HTML as a `String` (props conversion) or `&String` plus a
component name (full component conversion).
- **Output**: React JSX — converted attributes (`class` → `className`, `for` →
`htmlFor`, `tabindex` → `tabIndex`), inline `style` strings as style objects,
and, for component conversion, a complete component wrapped with
`import React from "react"` and a fragment root.