Skip to content

Commit

Permalink
0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Aug 1, 2023
1 parent 4cde914 commit 6faa6cf
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 26 deletions.
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ freya-dom = { path = "dom", version = "0.1.0" }
freya-testing = { path = "testing", version = "0.1.0" }
torin = { path = "torin", version = "0.1.0" }

dioxus = { git = "https://github.com/DioxusLabs/dioxus", rev="f69b84bf34114c68749e956f26ed61db38079f7c" }
dioxus-native-core-macro = { git = "https://github.com/DioxusLabs/dioxus", rev="f69b84bf34114c68749e956f26ed61db38079f7c" }
dioxus-rsx = { git = "https://github.com/DioxusLabs/dioxus", rev="f69b84bf34114c68749e956f26ed61db38079f7c" }
dioxus-native-core = { git = "https://github.com/DioxusLabs/dioxus", rev="f69b84bf34114c68749e956f26ed61db38079f7c", features=["dioxus"] }
dioxus-core-macro = { git = "https://github.com/DioxusLabs/dioxus", rev="f69b84bf34114c68749e956f26ed61db38079f7c" }
dioxus-hooks = { git = "https://github.com/DioxusLabs/dioxus", rev="f69b84bf34114c68749e956f26ed61db38079f7c" }
dioxus-core = { git = "https://github.com/DioxusLabs/dioxus", rev="f69b84bf34114c68749e956f26ed61db38079f7c" }
dioxus-hot-reload = { git = "https://github.com/DioxusLabs/dioxus", rev="f69b84bf34114c68749e956f26ed61db38079f7c" }
dioxus-router = { git = "https://github.com/DioxusLabs/dioxus", rev="f69b84bf34114c68749e956f26ed61db38079f7c" }
dioxus = { version = "0.4" }
dioxus-native-core-macro = { version = "0.4" }
dioxus-rsx = { version = "0.4", features=["hot_reload"] }
dioxus-native-core = { version = "0.4", features=["dioxus"] }
dioxus-core-macro = { version = "0.4" }
dioxus-hooks = { version = "0.4" }
dioxus-core = { version = "0.4" }
dioxus-hot-reload = { version = "0.4", features=["file_watcher"] }
dioxus-router = { version = "0.4" }

gl = "0.14.0"
glutin = "0.30.6"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Add Freya as a dependency via git (it's not published on [crates.io](https://cra

```toml
freya = { git = "https://github.com/marc2332/freya" }
dioxus = { git = "https://github.com/DioxusLabs/dioxus", rev="f69b84bf34114c68749e956f26ed61db38079f7c", features = ["macro", "hooks"]}
dioxus = { version = "0.4", features = ["macro", "hooks"]}
```

### Features ✨
Expand Down
2 changes: 1 addition & 1 deletion book/src/guides/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ edition = "2021"

[dependencies]
freya = { git = "https://github.com/marc2332/freya" }
dioxus = { git = "https://github.com/DioxusLabs/dioxus", rev="f69b84bf34114c68749e956f26ed61db38079f7c", features = ["macro", "hooks"]}
dioxus = { version = "0.4", features = ["macro", "hooks"]}
```

### src/main.rs
Expand Down
3 changes: 2 additions & 1 deletion components/src/dropdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ where
}
)
} else {
let selected = selected.read().to_string();
render!(
rect {
margin: "5",
Expand All @@ -237,7 +238,7 @@ where
padding: "7",
label {
align: "center",
"{selected.read()}"
"{selected}"
}
rect {
width: "100%",
Expand Down
6 changes: 2 additions & 4 deletions devtools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,7 @@ pub fn DevTools(cx: Scope<DevToolsProps>) -> Element {
width: "100%",
height: "100%",
color: theme.body.color,
Router {

}
Router::<Route> { }
}
)
}
Expand All @@ -201,7 +199,7 @@ pub fn DevtoolsBar(cx: Scope) -> Element {
label: "Elements"
}
}
Outlet {}
Outlet::<Route> {}
)
}

Expand Down
2 changes: 1 addition & 1 deletion devtools/src/tab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub struct TabButtonProps<'a> {

#[allow(non_snake_case)]
pub fn TabButton<'a>(cx: Scope<'a, TabButtonProps<'a>>) -> Element<'a> {
let router = use_generic_navigator::<Route>(cx);
let router = use_navigator(cx);
let theme = use_get_theme(cx);
let status = use_state(cx, ButtonStatus::default);

Expand Down
4 changes: 2 additions & 2 deletions devtools/src/tabs/tree.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use dioxus::prelude::*;
use dioxus_native_core::NodeId;
use dioxus_router::prelude::use_generic_navigator;
use dioxus_router::prelude::use_navigator;
use freya_components::*;

use crate::{node::NodeElement, NodeIdSerializer, Route, TreeNode};
Expand All @@ -13,7 +13,7 @@ pub fn NodesTree<'a>(
selected_node_id: Option<NodeId>,
onselected: EventHandler<'a, &'a TreeNode>,
) -> Element<'a> {
let router = use_generic_navigator::<Route>(cx);
let router = use_navigator(cx);
let nodes = use_shared_state::<Vec<TreeNode>>(cx).unwrap();

render!(VirtualScrollView {
Expand Down
13 changes: 6 additions & 7 deletions elements/src/elements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,12 @@ pub mod events {
$(
$( #[$attr] )*
pub fn $name<'a>(_cx: &'a ::dioxus_core::ScopeState, _f: impl FnMut(::dioxus_core::Event<$data>) + 'a) -> ::dioxus_core::Attribute<'a> {
::dioxus_core::Attribute {
name: stringify!($name),
value: _cx.listener(_f),
namespace: None,
mounted_element: Default::default(),
volatile: false,
}
::dioxus_core::Attribute::new(
stringify!($name),
_cx.listener(_f),
None,
false,
)
}
)*
};
Expand Down

0 comments on commit 6faa6cf

Please sign in to comment.