-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do not force default features on consumers #8
base: main
Are you sure you want to change the base?
Conversation
I would love to see cross platform support like this! Unfortunately this crate still relies on a few dependencies that are still web-only, like |
…ed by Cargo book)
the problem is that adding this crate to dependencies enables the dioxus logging functionality by default, and I'm rolling my own logger which then panics. |
Just wondering, what specific features of dx are enabled by default that could not be wanted when using this library? It doesn't make sense, the features you disabled are enabled anyway because of the other dx dependencies used here, so it doesn't really change anything Few things to improve nonetheless:
|
Fair point, but I'd just switch to dioxus-lib then |
all right let me try... |
mkay I'm down to 1 error error[E0599]: no method named `as_web_event` found for reference `&MountedData` in the current scope
--> src/use_list.rs:86:32
|
86 | let elem = mounted.as_web_event();
| ^^^^^^^^^^^^ method not found in `&MountedData`
For more information about this error, try `rustc --explain E0599`. |
but it doesn't fix the problem because https://github.com/dioxus-community/dioxus-resize-observer/blob/20cd988e9ce13680179d11141220cc4f0474c4c0/Cargo.toml#L10 |
it works now? |
still testing |
Moving dioxus behind a feature won't fix it, we probably also need to change https://github.com/dioxus-community/dioxus-use-mounted/blob/779bda19f6c87125170f8859701ba1df172813ff/Cargo.toml#L10 to dioxus-lib, if you can setup a PR really quick I can merge it and release it |
ok it's still getting pulled by |
so once this and dioxus-community/dioxus-use-mounted#6 get merged it should work |
left some comments |
Just released https://crates.io/crates/dioxus-use-mounted @Niedzwiedzw :) |
|
nothing needs to be done here cause the specified version is |
Yeah, just make sure to run |
all right it officially works on my machine™ |
Nice! |
@@ -49,4 +49,3 @@ fn app() -> Element { | |||
onmounted: move |event| list.mounted.onmounted(event) | |||
}) | |||
} | |||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason this was removed? seems like an accident
|
||
[dev-dependencies] | ||
console_error_panic_hook = "0.1.7" | ||
console_error_panic_hook = "0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console_error_panic_hook = "0.1" | |
console_error_panic_hook = "0.1" | |
dioxus = { version = "0.6", features = ["web"] } |
use dioxus_lazy::{lazy, List}; | ||
use dioxus_lib::prelude::*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use dioxus_lib::prelude::*; | |
use dioxus::prelude::*; |
@@ -18,5 +18,5 @@ fn main() { | |||
dioxus_logger::init(Level::INFO).unwrap(); | |||
console_error_panic_hook::set_once(); | |||
|
|||
dioxus::launch(app); | |||
dioxus_web::launch::launch_cfg(app, dioxus_web::Config::new()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dioxus_web::launch::launch_cfg(app, dioxus_web::Config::new()) | |
launch(app) |
use dioxus_lazy::{lazy, List}; | ||
use dioxus_lib::prelude::*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use dioxus_lib::prelude::*; | |
use dioxus::prelude::*; |
@@ -17,6 +17,5 @@ fn app() -> Element { | |||
fn main() { | |||
dioxus_logger::init(Level::INFO).unwrap(); | |||
console_error_panic_hook::set_once(); | |||
|
|||
dioxus::launch(app); | |||
dioxus_web::launch::launch_cfg(app, dioxus_web::Config::new()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dioxus_web::launch::launch_cfg(app, dioxus_web::Config::new()) | |
launch(app) |
use dioxus_lazy::{lazy, Direction, UseList}; | ||
use dioxus_lib::prelude::*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use dioxus_lib::prelude::*; | |
use dioxus::prelude::*; |
@@ -16,6 +16,5 @@ fn app() -> Element { | |||
fn main() { | |||
dioxus_logger::init(Level::INFO).unwrap(); | |||
console_error_panic_hook::set_once(); | |||
|
|||
dioxus::launch(app); | |||
dioxus_web::launch::launch_cfg(app, dioxus_web::Config::new()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dioxus_web::launch::launch_cfg(app, dioxus_web::Config::new()) | |
launch(app) |
No description provided.