mirror of
https://github.com/adoyle0/leptos-use.git
synced 2025-01-23 00:59:22 -05:00
Removed signal warnings from use_websocket
's send...
methods
This commit is contained in:
parent
072a7f12a2
commit
4da91b4427
2 changed files with 6 additions and 2 deletions
|
@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased] -
|
||||
|
||||
### Fix 🍕
|
||||
|
||||
- Removed signal warnings from `use_websocket`'s `send...` methods.
|
||||
|
||||
### Changes 🔥
|
||||
|
||||
- `use_color_mode` now supports detection from an url query parameter. (thanks to @mondeja)
|
||||
|
|
|
@ -402,7 +402,7 @@ pub fn use_websocket_with_options(
|
|||
// Send text (String)
|
||||
let send = {
|
||||
Box::new(move |data: &str| {
|
||||
if ready_state.get() == ConnectionReadyState::Open {
|
||||
if ready_state.get_untracked() == ConnectionReadyState::Open {
|
||||
if let Some(web_socket) = ws_ref.get_value() {
|
||||
let _ = web_socket.send_with_str(data);
|
||||
}
|
||||
|
@ -412,7 +412,7 @@ pub fn use_websocket_with_options(
|
|||
|
||||
// Send bytes
|
||||
let send_bytes = move |data: Vec<u8>| {
|
||||
if ready_state.get() == ConnectionReadyState::Open {
|
||||
if ready_state.get_untracked() == ConnectionReadyState::Open {
|
||||
if let Some(web_socket) = ws_ref.get_value() {
|
||||
let _ = web_socket.send_with_u8_array(&data);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue