Hotreloading of for/if/body, formatted strings, literals, component props, nested rsx, light CLI rewrite, cli TUI (#2258)
Hotreload the contents of for loops, if chains, component bodies, props, attributes, and any literals discovered in rsx! Add a TUI renderer to the CLI. Improve the CLI build system to be async and parallel. Refactor RSX to allow partial expansion of expressions. Merge autofmt implementations for consistency. Merge the representation of elements and components under the hood. Add a diagnostics system for rsx for improved error messages. Drop interprocess and move to websockets for communication between the CLI and the server. Assign IDs to nodes and attributes in a stable way to be used in non compiler contexts. Add hotreloading to any body of component/for loop/if chain/etc. --------- Co-authored-by: Evan Almloff <evanalmloff@gmail.com> Co-authored-by: Liam Mitchell <liamkarlmitchell@gmail.com>
This commit is contained in:
181 files changed
+12755
-10806
No files matched your search
@@ -68,7 +68,7 @@ rsx! {
|
||||
div {
|
||||
class: "my-class {value}", // <--- attribute
|
||||
onclick: move |_| println!("clicked!"), // <--- listener
|
||||
h1 { "hello world" }, // <--- child
|
||||
h1 { "hello world" } // <--- child
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
@@ -35,6 +35,7 @@ type SendContext = dyn Fn() -> Box<dyn Any + Send + Sync> + Send + Sync + 'stati
|
||||
|
||||
type UnsendContext = dyn Fn() -> Box<dyn Any> + 'static;
|
||||
|
||||
#[allow(clippy::redundant_closure)] // clippy doesnt doesn't understand our coercion to fn
|
||||
impl LaunchBuilder {
|
||||
/// Create a new builder for your application. This will create a launch configuration for the current platform based on the features enabled on the `dioxus` crate.
|
||||
// If you aren't using a third party renderer and this is not a docs.rs build, generate a warning about no renderer being enabled
|
||||
|
||||
@@ -96,7 +96,7 @@ pub mod prelude {
|
||||
feature = "hot-reload"
|
||||
))]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "hot-reload")))]
|
||||
pub use dioxus_hot_reload::{self, hot_reload_init};
|
||||
pub use dioxus_hot_reload;
|
||||
|
||||
pub use dioxus_core;
|
||||
|
||||
|
||||
Reference in new issue
Block a user