wip: move examples around

This commit is contained in:
Jonathan Kelley committed 2021-11-03 15:13:50 -04:00
1 parent d298b626d3
commit 1e6e5e611b
86 files changed
+160 -216

No files matched your search

+5 -5
View File
@@ -23,9 +23,9 @@ pub struct TodoItem {
const STYLE: &str = include_str!("./assets/todomvc.css");
const App: FC<()> = |(cx, props)| {
let draft = use_state(cx, || "".to_string());
let todos = use_state(cx, || HashMap::<u32, Rc<TodoItem>>::new());
let filter = use_state(cx, || FilterState::All);
let mut draft = use_state(cx, || "".to_string());
let mut todos = use_state(cx, || HashMap::<u32, Rc<TodoItem>>::new());
let mut filter = use_state(cx, || FilterState::All);
let todolist = todos
.iter()
@@ -86,8 +86,8 @@ pub struct TodoEntryProps {
}
pub fn TodoEntry((cx, props): Scope<TodoEntryProps>) -> Element {
let is_editing = use_state(cx, || false);
let contents = use_state(cx, || String::from(""));
let mut is_editing = use_state(cx, || false);
let mut contents = use_state(cx, || String::from(""));
let todo = &props.todo;
rsx!(cx, li {