feat: update builder
This commit is contained in:
1 parent
c97a9647e3
commit
8329268d39
2 files changed
+18
-18
No files matched your search
@@ -19,14 +19,14 @@ cannot drag the refs into the closure w
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static Example: FC<()> = |ctx| {
|
static Example: FC<()> = |ctx| {
|
||||||
let value = use_context(&ctx, |ctx: &SomeContext| ctx.items.last().unwrap());
|
// let value = use_context(&ctx, |ctx: &SomeContext| ctx.items.last().unwrap());
|
||||||
|
|
||||||
// let b = *value;
|
// let b = *value;
|
||||||
// let v2 = *value;
|
// let v2 = *value;
|
||||||
let cb = move |e| {
|
let cb = move |e| {
|
||||||
// let g = b.as_str();
|
// let g = b.as_str();
|
||||||
// let g = (v2).as_str();
|
// let g = (v2).as_str();
|
||||||
let g = (value).as_str();
|
// let g = (value).as_str();
|
||||||
// let g = b.as_str();
|
// let g = b.as_str();
|
||||||
};
|
};
|
||||||
// let r = *value;
|
// let r = *value;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ impl<'a>
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// use dodrio::{builder::*, bumpalo::Bump};
|
/// use dioxus::{builder::*, bumpalo::Bump};
|
||||||
///
|
///
|
||||||
/// let b = Bump::new();
|
/// let b = Bump::new();
|
||||||
///
|
///
|
||||||
@@ -93,7 +93,7 @@ where
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use dodrio::{builder::*, bumpalo::Bump};
|
/// use dioxus::{builder::*, bumpalo::Bump};
|
||||||
///
|
///
|
||||||
/// let b = Bump::new();
|
/// let b = Bump::new();
|
||||||
///
|
///
|
||||||
@@ -136,7 +136,7 @@ where
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use dodrio::{builder::*, bumpalo::Bump, Attribute};
|
/// use dioxus::{builder::*, bumpalo::Bump, Attribute};
|
||||||
///
|
///
|
||||||
/// let b = Bump::new();
|
/// let b = Bump::new();
|
||||||
///
|
///
|
||||||
@@ -175,7 +175,7 @@ where
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use dodrio::{builder::*, bumpalo::Bump};
|
/// use dioxus::{builder::*, bumpalo::Bump};
|
||||||
///
|
///
|
||||||
/// let b = Bump::new();
|
/// let b = Bump::new();
|
||||||
///
|
///
|
||||||
@@ -208,7 +208,7 @@ where
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use dodrio::{builder::*, bumpalo::Bump};
|
/// use dioxus::{builder::*, bumpalo::Bump};
|
||||||
///
|
///
|
||||||
/// let b = Bump::new();
|
/// let b = Bump::new();
|
||||||
///
|
///
|
||||||
@@ -253,7 +253,7 @@ where
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use dodrio::{builder::*, bumpalo::Bump};
|
/// use dioxus::{builder::*, bumpalo::Bump};
|
||||||
///
|
///
|
||||||
/// let b = Bump::new();
|
/// let b = Bump::new();
|
||||||
///
|
///
|
||||||
@@ -274,7 +274,7 @@ where
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use dodrio::{builder::*, bumpalo::Bump, VNode};
|
/// use dioxus::{builder::*, bumpalo::Bump, VNode};
|
||||||
///
|
///
|
||||||
/// let b = Bump::new();
|
/// let b = Bump::new();
|
||||||
///
|
///
|
||||||
@@ -322,7 +322,7 @@ where
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use dodrio::{builder::*, bumpalo::Bump};
|
/// use dioxus::{builder::*, bumpalo::Bump};
|
||||||
///
|
///
|
||||||
/// let b = Bump::new();
|
/// let b = Bump::new();
|
||||||
///
|
///
|
||||||
@@ -357,7 +357,7 @@ where
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use dodrio::{builder::*, bumpalo::Bump};
|
/// use dioxus::{builder::*, bumpalo::Bump};
|
||||||
///
|
///
|
||||||
/// let b = Bump::new();
|
/// let b = Bump::new();
|
||||||
///
|
///
|
||||||
@@ -387,7 +387,7 @@ where
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use dodrio::{builder::*, bumpalo::Bump};
|
/// use dioxus::{builder::*, bumpalo::Bump};
|
||||||
/// use js_sys::Math;
|
/// use js_sys::Math;
|
||||||
///
|
///
|
||||||
/// let b = Bump::new();
|
/// let b = Bump::new();
|
||||||
@@ -416,7 +416,7 @@ where
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use dodrio::{builder::*, bumpalo::Bump};
|
/// use dioxus::{builder::*, bumpalo::Bump};
|
||||||
/// use js_sys::Math;
|
/// use js_sys::Math;
|
||||||
///
|
///
|
||||||
/// let b = Bump::new();
|
/// let b = Bump::new();
|
||||||
@@ -1022,14 +1022,14 @@ builder_constructors! {
|
|||||||
|
|
||||||
/// Construct a text VNode.
|
/// Construct a text VNode.
|
||||||
///
|
///
|
||||||
/// This is `dodrio`'s virtual DOM equivalent of `document.createTextVNode`.
|
/// This is `dioxus`'s virtual DOM equivalent of `document.createTextVNode`.
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use dodrio::builder::*;
|
/// use dioxus::builder::*;
|
||||||
///
|
///
|
||||||
/// let my_text = text("hello, dodrio!");
|
/// let my_text = text("hello, dioxus!");
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn text<'a>(contents: &'a str) -> VNode<'a> {
|
pub fn text<'a>(contents: &'a str) -> VNode<'a> {
|
||||||
@@ -1044,7 +1044,7 @@ pub fn text<'a>(contents: &'a str) -> VNode<'a> {
|
|||||||
/// id="my-id"/>`.
|
/// id="my-id"/>`.
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use dodrio::builder::*;
|
/// use dioxus::builder::*;
|
||||||
///
|
///
|
||||||
/// let my_id_attr = attr("id", "my-id");
|
/// let my_id_attr = attr("id", "my-id");
|
||||||
/// ```
|
/// ```
|
||||||
@@ -1060,7 +1060,7 @@ pub fn attr<'a>(name: &'a str, value: &'a str) -> Attribute<'a> {
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use dodrio::{builder::*, bumpalo::Bump};
|
/// use dioxus::{builder::*, bumpalo::Bump};
|
||||||
///
|
///
|
||||||
/// let b = Bump::new();
|
/// let b = Bump::new();
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in new issue
Block a user