You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-24Lines changed: 2 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@
49
49
Dioxus is a portable, performant, and ergonomic framework for building cross-platform user experiences in Rust.
50
50
51
51
```rust
52
-
staticApp:FC<()> =|cx, props| {
52
+
staticApp:FC<()> =|(cx, props)| {
53
53
letmutcount=use_state(cx, ||0);
54
54
55
55
cx.render(rsx!(
@@ -96,28 +96,6 @@ If you know React, then you already know Dioxus.
96
96
97
97
See the awesome-dioxus page for a curated list of content in the Dioxus Ecosystem.
98
98
99
-
<!--
100
-
currently commented out until we have more content on the website
101
-
## Explore
102
-
- [**Fine-grained reactivity**: Skip the diff overhead with signals ](docs/guides/00-index.md)
103
-
- [**HTML Templates**: Drop in existing HTML5 templates with html! macro](docs/guides/00-index.md)
104
-
- [**RSX Templates**: Clean component design with rsx! macro](docs/guides/00-index.md)
105
-
- [**Running the examples**: Explore the vast collection of samples, tutorials, and demos](docs/guides/00-index.md)
106
-
- [**Building applications**: Use the Dioxus CLI to build and bundle apps for various platforms](docs/guides/01-ssr.md)
107
-
- [**Liveview**: Build custom liveview components that simplify datafetching on all platforms](docs/guides/01-ssr.md)
108
-
- [**State management**: Easily add powerful state management that comes integrated with Dioxus Core](docs/guides/01-ssr.md)
109
-
- [**Concurrency**: Drop in async where it fits and suspend components until new data is ready](docs/guides/01-ssr.md)
110
-
- [**1st party hooks**: Cross-platform router hook](docs/guides/01-ssr.md)
111
-
- [**Community hooks**: 3D renderers](docs/guides/01-ssr.md)
112
-
## Blog Posts
113
-
- [Why we need a stronger typed web]()
114
-
- [Isomorphic webapps in 10 minutes]()
115
-
- [Rust is high level too]()
116
-
- [Eliminating crashes with Rust webapps]()
117
-
- [Tailwind for Dioxus]()
118
-
- [The monoglot startup]()
119
-
-->
120
-
121
99
## Why?
122
100
123
101
TypeScript is a great addition to JavaScript, but comes with a lot of tweaking flags, a slight performance hit, and an uneven ecosystem where some of the most important packages are not properly typed. TypeScript provides a lot of great benefits to JS projects, but comes with its own "tax" that can slow down dev teams. Rust can be seen as a step up from TypeScript, supporting:
@@ -130,7 +108,7 @@ TypeScript is a great addition to JavaScript, but comes with a lot of tweaking f
130
108
- integrated documentation
131
109
- inline built-in unit/integration testing
132
110
- best-in-class error handling
133
-
- simple and fast build system (compared to webpack!)
111
+
- simple and fast build system (compared to WebPack!)
134
112
- powerful standard library (no need for lodash or underscore)
135
113
- include_str! for integrating html/css/svg templates directly
136
114
- various macros (`html!`, `rsx!`) for fast template iteration
If we use the `TITLE` atom in another component, we can cause updates to flow between components without calling render or diffing either component trees:
106
106
107
107
```rust
108
-
constReceiver:FC<()> =|cx, props|{
108
+
constReceiver:FC<()> =|(cx, props)|{
109
109
lettitle=use_signal(&cx, &TITLE);
110
110
log::info!("This will only be called once!");
111
111
rsx!(cx,
@@ -132,7 +132,7 @@ Dioxus automatically understands how to use your signals when mixed with iterato
0 commit comments