Commit Graph
19 Commits
Author SHA1 Message Date
Evan Almloff d8d11db403 Boxed and mapped signals preparing for stores (#4413)
This PR contains just the breaking changes required for the upcoming store implementation. It adds two new primitives:

Mutable mapped signals (without a different subscriber list). This lets you scope a writable value and pass it to a child component. It requires two closures to map the immutable and mutable references to the inner signal. With stores, these closures will be derived
Boxed readable and writable values (ReadSignal, and WriteSignal). Any readable or writable types can be converted to a read signal or write signal with the boxed method or built in types are automatically converted into the boxed variants when passing into props


* map signals mutably

* boxed signals

* remove mutable borrow type from boxed writable

* improve map mut example

* restore boxed_mut helper

* make boxed readable/writable types copy

* Move away from the ReadOnlySignal alias in examples

* automatically convert Write

* Fix some tests

* ReadSignal and WriteSignal

* move read only signal alias

* make maps copy

* store prototype

* implement derive macro

* Handle generics in the derive macro

* Make Selector boxable

* derive boxed conversion

* Get rid of store type

* Remove hardcoded type from derive macro

* selector -> store

* Refactor store implementation

* more vec methods

* todo mvc store example

* Implement Storable for HashMap

* fix write

* restore sorting logic in todomvc

* derive readable and writable

* improve todomvc store example

* Result store

* Option store

* collect dead subscribers

* fix clippy and formatting

* recognize some common foreign types automatically

* fix foreign stores in props

* slice and array selectors

* clean up store example

* remove stores

* writable is child owned

* fix typo

* fix clippy

* fix doc tests
2025-07-31 13:19:55 -07:00
Evan AlmloffandJonathan Kelley 519ec9d294 Move the document trait into a separate crate (#3035)
* add a default head method through eval
* remove the old document trait
* implement document for each platform
* pull out document into a dedicated crate to cut down on shared dependencies
---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-10-14 10:33:37 -07:00
Evan AlmloffandJonathan Kelley 20d146d9bd Simplify the launch builder (#2967)
* improve documentation for the fullstack server context

* Add a section about axum integration to the crate root docs

* make serve_dioxus_application accept the cfg builder directly

* remove unused server_fn module

* improve fullstack config docs

* improve documentation for the server function macro

* fix axum router extension link

* Fix doc tests

* Fix launch builder

* Simplify the launch builder

* don't re-export launch in the prelude

* refactor fullstack launch

* Fix fullstack launch builder

* Update static generation with the new builder api

* fix some formatting/overly broad launch replacements

* fix custom menu example

* fix fullstack/static generation examples

* Fix static generation launch

* A few small formatting fixes

* Fix a few doc tests

* implement LaunchConfig for serve configs

* fix fullstack launch with separate web and server launch methods

* fix check with all features

* dont expose inner core module

* clippy and check

* fix readme

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-10-10 16:00:58 -07:00
Evan AlmloffandJonathan Kelley c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688)
* use head elements and new manganis syntax in examples
* only enable desktop workspace example scraping during a dioxus release

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-07-25 21:58:00 +00:00
Evan Almloff d795995e20 Create closure type; allow async event handlers in props; allow short hand event handlers (#2437)
* create closure type; allow async event handlers in props; allow shorthand event handlers

* test forwarding event handlers with the shorthand syntax

* fix clippy

* fix imports in spawn async doctest
2024-06-10 18:47:07 -07:00
Jonathan Kelley bb5ecd779f clean up some examples, ensuring stuff works 2024-03-06 19:50:07 -08:00
Jeremy Arnold 89ae287fed add weather_app to examples, update for 0.5 2024-02-14 13:56:26 -08:00
Jonathan Kelley 420a30e5d4 feat: overhaul examples and clean things up 2022-01-03 00:42:17 -05:00
Jonathan Kelley cafb7df736 docs: remove all usages of static closure syntax and update readme 2022-01-02 18:35:38 -05:00
Jonathan Kelley d1560450ba wip: remove runner on hook and then update docs 2022-01-02 02:15:04 -05:00
Jonathan Kelley 3dc0e59876 fix: readme and examples syntax 2021-12-28 23:48:25 -05:00
Jonathan Kelley 4de16c4779 docs: update local examples and docs to support new syntaxes 2021-12-15 15:56:53 -05:00
Jonathan Kelley 1e4a599d14 wip: rename fc to component 2021-12-09 21:19:31 -05:00
Jonathan Kelley fd93ee89c1 feat: upgrade syntax 2021-11-10 17:09:52 -05:00
Jonathan Kelley 2933e4bc11 wip: major cleanups to scheduler 2021-11-06 23:11:17 -04:00
Jonathan Kelley 1e6e5e611b wip: move examples around 2021-11-03 15:13:50 -04:00
Jonathan Kelley 9726a065b0 feat: massage lifetimes 2021-10-16 17:37:28 -04:00
Jonathan Kelley 82953f2ac3 wip: threadsafe 2021-10-01 02:07:12 -04:00
Jonathan Kelley 823adc0834 polish: clean up the web module 2021-09-24 20:11:30 -04:00