wip: rename fc to component

This commit is contained in:
Jonathan Kelley committed 2021-12-09 21:19:31 -05:00
1 parent 85ab8b91c6
commit 1e4a599d14
61 files changed
+524 -145

No files matched your search

+2 -2
View File
@@ -13,12 +13,12 @@ mod test_logging;
fn shared_state_test() {
struct MySharedState(&'static str);
static App: FC<()> = |cx, props| {
static App: Component<()> = |cx, props| {
cx.provide_state(MySharedState("world!"));
cx.render(rsx!(Child {}))
};
static Child: FC<()> = |cx, props| {
static Child: Component<()> = |cx, props| {
let shared = cx.consume_state::<MySharedState>()?;
cx.render(rsx!("Hello, {shared.0}"))
};