feat: mvoe away from compound context

This commit is contained in:
Jonathan Kelley committed 2021-09-21 13:42:52 -04:00
1 parent bfdcb20437
commit a2c7d17b05
103 files changed
+309 -293

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@ struct DogApi {
const ENDPOINT: &str = "https://dog.ceo/api/breeds/image/random/";
static App: FC<()> = |cx| {
static App: FC<()> = |cx, props|{
let state = use_state(cx, || 0);
let dog_node = use_suspense(
+2 -2
View File
@@ -22,7 +22,7 @@ fn main() {
dioxus_web::launch(APP, |c| c)
}
static APP: FC<()> = |cx| {
static APP: FC<()> = |cx, props|{
let mut count = use_state(cx, || 3);
cx.render(rsx! {
@@ -44,7 +44,7 @@ static APP: FC<()> = |cx| {
})
};
static Child: FC<()> = |cx| {
static Child: FC<()> = |cx, props|{
cx.render(rsx! {
div {
div {
+1 -1
View File
@@ -24,7 +24,7 @@ fn main() {
dioxus_web::launch(App, |c| c)
}
static App: FC<()> = |cx| {
static App: FC<()> = |cx, props|{
let mut state = use_state(cx, || 0);
cx.render(rsx! {
div {
+2 -2
View File
@@ -22,7 +22,7 @@ fn main() {
// dioxus::web::launch(App, |c| c);
}
static App: FC<()> = |cx| {
static App: FC<()> = |cx, props|{
dbg!("rednering parent");
cx.render(rsx! {
div {
@@ -39,7 +39,7 @@ static App: FC<()> = |cx| {
})
};
static But: FC<()> = |cx| {
static But: FC<()> = |cx, props|{
let mut count = use_state(cx, || 0);
// let d = Dropper { name: "asd" };
+6 -6
View File
@@ -25,7 +25,7 @@ fn main() {
dioxus_web::launch(App, |c| c)
}
pub static App: FC<()> = |cx| {
pub static App: FC<()> = |cx, props|{
cx.render(rsx!(
div { class: "overflow-hidden"
link { href:"https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel:"stylesheet" }
@@ -40,7 +40,7 @@ pub static App: FC<()> = |cx| {
))
};
pub static Header: FC<()> = |cx| {
pub static Header: FC<()> = |cx, props|{
cx.render(rsx! {
div {
header { class: "text-gray-400 bg-gray-900 body-font"
@@ -66,7 +66,7 @@ pub static Header: FC<()> = |cx| {
})
};
pub static Hero: FC<()> = |cx| {
pub static Hero: FC<()> = |cx, props|{
//
cx.render(rsx! {
section{ class: "text-gray-400 bg-gray-900 body-font"
@@ -104,7 +104,7 @@ pub static Hero: FC<()> = |cx| {
}
})
};
pub static Entry: FC<()> = |cx| {
pub static Entry: FC<()> = |cx, props|{
//
cx.render(rsx! {
section{ class: "text-gray-400 bg-gray-900 body-font"
@@ -117,7 +117,7 @@ pub static Entry: FC<()> = |cx| {
})
};
pub static StacksIcon: FC<()> = |cx| {
pub static StacksIcon: FC<()> = |cx, props|{
cx.render(rsx!(
svg {
// xmlns: "http://www.w3.org/2000/svg"
@@ -132,7 +132,7 @@ pub static StacksIcon: FC<()> = |cx| {
}
))
};
pub static RightArrowIcon: FC<()> = |cx| {
pub static RightArrowIcon: FC<()> = |cx, props|{
cx.render(rsx!(
svg {
fill: "none"