Add a prelude module to Dioxus Native (#5104)
* Add prelude to dioxus-native crate Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix unreachable_patterns lint --------- Signed-off-by: Nico Burns <nico@nicoburns.com>
This commit is contained in:
1 parent
db23197925
commit
31bee1417c
7 files changed
+71
-17
No files matched your search
@@ -111,6 +111,7 @@ impl DioxusNativeApplication {
|
||||
not(target_os = "android"),
|
||||
not(target_os = "ios")
|
||||
)))]
|
||||
#[allow(unreachable_patterns)]
|
||||
_ => {
|
||||
let _ = event_loop;
|
||||
let _ = event;
|
||||
|
||||
@@ -15,6 +15,9 @@ mod dioxus_application;
|
||||
mod dioxus_renderer;
|
||||
mod link_handler;
|
||||
|
||||
#[cfg(feature = "prelude")]
|
||||
pub mod prelude;
|
||||
|
||||
#[doc(inline)]
|
||||
pub use dioxus_native_dom::*;
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// RSX and component definition
|
||||
pub use dioxus_core;
|
||||
pub use dioxus_core::{
|
||||
consume_context, provide_context, spawn, suspend, try_consume_context, use_drop, use_hook,
|
||||
AnyhowContext, Attribute, Callback, Component, Element, ErrorBoundary, ErrorContext, Event,
|
||||
EventHandler, Fragment, HasAttributes, IntoDynNode, RenderError, ScopeId, SuspenseBoundary,
|
||||
SuspenseContext, VNode, VirtualDom,
|
||||
};
|
||||
#[allow(deprecated)]
|
||||
pub use dioxus_core_macro::{component, rsx, Props};
|
||||
pub use dioxus_html as dioxus_elements;
|
||||
pub use dioxus_html::{
|
||||
events::*, extensions::*, global_attributes, keyboard_types, svg_attributes, traits::*,
|
||||
GlobalAttributesExtension, SvgAttributesExtension,
|
||||
};
|
||||
pub use dioxus_html::{Code, Key, Location, Modifiers};
|
||||
|
||||
// Assets
|
||||
pub use manganis::{self, *};
|
||||
|
||||
// Hooks, signals, stores
|
||||
pub use dioxus_hooks::*;
|
||||
pub use dioxus_signals::{self, *};
|
||||
pub use dioxus_stores::{self, store, use_store, GlobalStore, ReadStore, Store, WriteStore};
|
||||
|
||||
// Document and History
|
||||
pub use dioxus_document::{self as document, Meta, Stylesheet, Title};
|
||||
pub use dioxus_history::{history, History};
|
||||
Reference in new issue
Block a user