depreciate the render macro
This commit is contained in:
1 parent
90d0164b9e
commit
e65c5f0eb3
148 files changed
+459
-458
No files matched your search
@@ -176,12 +176,12 @@ impl ScopeContext {
|
||||
///
|
||||
/// static app: Component = |cx| {
|
||||
/// cx.use_hook(|| cx.provide_context(SharedState("world")));
|
||||
/// render!(Child {})
|
||||
/// rsx!(Child {})
|
||||
/// }
|
||||
///
|
||||
/// static Child: Component = |cx| {
|
||||
/// let state = cx.consume_state::<SharedState>();
|
||||
/// render!(div { "hello {state.0}" })
|
||||
/// rsx!(div { "hello {state.0}" })
|
||||
/// }
|
||||
/// ```
|
||||
pub fn provide_context<T: 'static + Clone>(&self, value: T) -> T {
|
||||
|
||||
Reference in new issue
Block a user