Commit graph

26 commits

Author SHA1 Message Date
ASR-ASU
1dfa1b5e7f
Use of async_std::task::sleep instead of tokio::time::sleep in examples (#2912)
* Use of async_std::task::sleep instead of tokio::time::sleep

* Make the clock example run on wasm

* Add control_focus and eval examples to Cargo.toml

* Use web-time on desktop; It just falls back to std on non-wasm platforms

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-09-03 15:16:37 +00:00
Christos KK Loverdos
ffe02b43c5
fix: typo (#2202) 2024-03-31 10:24:24 -05:00
Jonathan Kelley
cbadea022a
Eval should never return an error
Only awaiting eval should error.
Eval should always be available, even if using its methods returns errors.
2024-02-14 15:13:15 -08:00
Jonathan Kelley
bdbae8ccb0
Update examples, add css 2024-02-14 12:33:07 -08:00
Jonathan Kelley
8f70a84c70
Use futures_util mutex instead of flume for sending flush lock wakeups 2024-02-02 13:09:26 -08:00
Jonathan Kelley
7c2947a131
Implement effects using reactivecontext 2024-02-01 13:21:52 -08:00
Jonathan Kelley
0c71b95e82
skeleton of use_server_future with reactivity 2024-02-01 13:21:52 -08:00
Jonathan Kelley
44966efde2
use_future works 2024-01-31 16:56:58 -08:00
Jonathan Kelley
c0522bc152
cargo check all 2024-01-23 16:58:29 -08:00
Jonathan Kelley
3ded0f5329
Make more examples cross-platform 2024-01-20 00:11:55 -08:00
Evan Almloff
e65c5f0eb3 depreciate the render macro 2024-01-16 13:18:46 -06:00
Evan Almloff
407a82588a fix more examples 2024-01-16 12:28:21 -06:00
Evan Almloff
db35a9b48c add platform specific functions for launching apps for workspaces 2024-01-16 11:45:02 -06:00
Evan Almloff
7e4d2debe0 implement launch builder for the desktop and web platforms 2024-01-16 08:42:16 -06:00
Jonathan Kelley
74aa55f85f
Bring back mroe hooks, remove old hooks, cleanup a number of examples 2024-01-15 17:04:39 -08:00
Jonathan Kelley
1dde044697
remove cx.render 2024-01-13 21:12:21 -08:00
Jonathan Kelley
fae0b08e61
Fix the router and stub out a number of crates to get compiling 2024-01-13 20:51:37 -08:00
Jonathan Kelley
dd4547d753
Feat: add global context functions
Add functions like window() and router() to
allow dynamically grabbing global contexts
without have to use the hook variants.

Deprecates the existing hook variants to
discourage folks from adding more noise
to their codebases.
2023-10-23 16:26:10 -04:00
Miles Murgaw
6210c6fefe
Convert use_eval to use send/recv system (#1080)
* progress: reworked

don't run this, it'll kill your web browser

* feat: use_eval but with comms

* revision: async recv & recv_sync

* revision: use_eval

* revision: standard eval interface

* revision: use serde_json::Value instead of JsValue

* revision: docs

* revision: error message

* create: desktop eval (wip)

* fix: desktop eval

* revision: wrap use_eval in Rc<RefCell<_>>

* fix: fmt, clippy

* fix: desktop tests

* revision: change to channel system

- fixes clippy errors
- fixes playwright tests

* fix: tests

* fix: eval example

* fix: fmt

* fix: tests, desktop stuff

* fix: tests

* feat: drop handler

* fix: tests

* fix: rustfmt

* revision: web promise/callback system

* fix: recv error

* revision: IntoFuture, functionation

* fix: ci

* revision: playwright web

* remove: unescessary code

* remove dioxus-html from public examples

* prototype-patch

* fix web eval

* fix: rustfmt

* fix: CI

* make use_eval more efficient

* implement eval for liveview as well

* fix playwright tests

* fix clippy

* more clippy fixes

* fix clippy

* fix stack overflow

* fix desktop mock

* fix clippy

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-07-21 17:36:25 -05:00
Jonathan Kelley
6dfe84834d fix eval example 2022-12-30 02:06:33 -05:00
Evan Almloff
bf47f64852 Merge branch 'upstream' into return-from-js 2022-12-08 11:25:15 -06:00
Evan Almloff
e863ef29b8 allow returning values from use_eval 2022-12-08 10:44:56 -06:00
Jonathan Kelley
4eefc3f854 chore: rename all &cx to cx, make clipppy happy 2022-12-07 13:11:40 -08:00
Jonathan Kelley
e09b6bf813 chore: tweak generic arguments and iterators in rsx 2022-11-15 20:58:56 -08:00
Jon Kelley
d9546d9504
Renderers are now packages, not features. (#387)
* feat: use synchronous router design

* feat: function to get router out of dom

* chore: restructure workspace to use renderers as packages, not features
2022-07-09 15:15:20 -04:00
Ilya Maximov
5e475fadd9
add a desktop eval example 2022-03-19 03:11:30 +01:00