dioxus-use-document 0.2.0

`use_head` hooks for dioxus
Documentation
use super::*;
use crate::hooks::use_document::UseDocument;

pub struct UseDocumentBuilder {}

impl Default for UseDocumentBuilder {
    fn default() -> Self {
        Self {}
    }
}

impl UseDocumentBuilder {
    pub fn use_document<'a>(&self, cx: &'a ScopeState) -> &'a mut UseDocument {
        let hook = UseDocument::new(cx).unwrap();
        cx.use_hook(|| hook)
    }
    pub fn use_title<'a>(&self, cx: &'a ScopeState) -> &'a mut UseTitle {
        let hook = UseTitle::new(cx).unwrap();
        cx.use_hook(|| hook)
    }
    pub fn use_charset<'a>(&self, cx: &'a ScopeState) -> &'a mut UseCharacterSet {
        let hook = UseCharacterSet::new(cx).unwrap();
        cx.use_hook(|| hook)
    }
}