mirror of
https://github.com/adoyle0/leptos-use.git
synced 2025-02-02 10:54:15 -05:00
added docs and changelog
This commit is contained in:
parent
e4ad9f11af
commit
9c035d50d8
4 changed files with 26 additions and 11 deletions
28
CHANGELOG.md
28
CHANGELOG.md
|
@ -7,23 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### New Features 🚀
|
### New Features 🚀
|
||||||
|
|
||||||
- There are now binary codecs in addition to string codecs.
|
- Codecs:
|
||||||
- `FromToBytesCodec`
|
- All codecs now live in their own crate `codee`
|
||||||
- `WebpackSerdeCodec` (requires feature `webpack_serde`)
|
- There are now binary codecs in addition to string codecs.
|
||||||
- `BincodeSerdeCodec` (requires feature `bincode_serde`)
|
- `FromToBytesCodec`
|
||||||
- `ProstCodec` (requires feature `prost`) (see also the section "Breaking Changes 🛠" below)
|
- `WebpackSerdeCodec`
|
||||||
- Every binary codec can be used as a string codec with the `Base64` wrapper which encodes the binary data as a base64
|
- `BincodeSerdeCodec`
|
||||||
string.
|
- `ProstCodec` (see also the section "Breaking Changes 🛠" below)
|
||||||
- This required feature `base64`
|
- Every binary codec can be used as a string codec with the `Base64` wrapper which encodes the binary data as a
|
||||||
- It can be wrapped for example like this: `Base64<WebpackSerdeCodec>`.
|
base64
|
||||||
- There is now an `OptionCodec` wrapper that allows to wrap any string codec that encodes `T` to encode `Option<T>`.
|
string.
|
||||||
- Use it like this: `OptionCodec<FromToStringCodec<f64>>`.
|
- This required feature `base64`
|
||||||
|
- It can be wrapped for example like this: `Base64<WebpackSerdeCodec>`.
|
||||||
|
- There is now an `OptionCodec` wrapper that allows to wrap any string codec that encodes `T` to encode `Option<T>`.
|
||||||
|
- Use it like this: `OptionCodec<FromToStringCodec<f64>>`.
|
||||||
|
|
||||||
- `ElementMaybeSignal` is now implemented for `websys::HtmlElement` (thanks to @blorbb).
|
- `ElementMaybeSignal` is now implemented for `websys::HtmlElement` (thanks to @blorbb).
|
||||||
- `UseStorageOptions` now has `delay_during_hydration` which has to be used when you conditionally show parts of
|
- `UseStorageOptions` now has `delay_during_hydration` which has to be used when you conditionally show parts of
|
||||||
the DOM controlled by a value from storage. This leads to hydration errors which can be fixed by setting this new
|
the DOM controlled by a value from storage. This leads to hydration errors which can be fixed by setting this new
|
||||||
option to `true`.
|
option to `true`.
|
||||||
- `cookie::SameSite` is now re-exported
|
- `cookie::SameSite` is now re-exported
|
||||||
- New book chapter about codecs
|
- New book chapter about codecs
|
||||||
|
- The macro `use_derive_signal!` is now exported (thanks to @mscofield0).
|
||||||
|
|
||||||
### Breaking Changes 🛠
|
### Breaking Changes 🛠
|
||||||
|
|
||||||
|
@ -35,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- The feature to enable this codec is now called `json_serde` instead of just `serde`.
|
- The feature to enable this codec is now called `json_serde` instead of just `serde`.
|
||||||
- `ProstCodec` now encodes as binary data. If you want to keep using it with string data you can wrap it like
|
- `ProstCodec` now encodes as binary data. If you want to keep using it with string data you can wrap it like
|
||||||
this: `Base64<ProstCodec>`. You have to enable both features `prost` and `base64` for this.
|
this: `Base64<ProstCodec>`. You have to enable both features `prost` and `base64` for this.
|
||||||
|
- All of these structs, traits and features now live in their own crate called `codee`
|
||||||
- `use_websocket`:
|
- `use_websocket`:
|
||||||
- `UseWebsocketOptions` has been renamed to `UseWebSocketOptions` (uppercase S) to be consistent with the return
|
- `UseWebsocketOptions` has been renamed to `UseWebSocketOptions` (uppercase S) to be consistent with the return
|
||||||
type.
|
type.
|
||||||
|
|
|
@ -104,6 +104,7 @@
|
||||||
- [is_some](utilities/is_some.md)
|
- [is_some](utilities/is_some.md)
|
||||||
- [use_cycle_list](utilities/use_cycle_list.md)
|
- [use_cycle_list](utilities/use_cycle_list.md)
|
||||||
- [use_debounce_fn](utilities/use_debounce_fn.md)
|
- [use_debounce_fn](utilities/use_debounce_fn.md)
|
||||||
|
- [use_derive_signal!](utilities/use_derive_signal.md)
|
||||||
- [use_supported](utilities/use_supported.md)
|
- [use_supported](utilities/use_supported.md)
|
||||||
- [use_throttle_fn](utilities/use_throttle_fn.md)
|
- [use_throttle_fn](utilities/use_throttle_fn.md)
|
||||||
- [use_to_string](utilities/use_to_string.md)
|
- [use_to_string](utilities/use_to_string.md)
|
||||||
|
|
5
docs/book/src/utilities/use_derive_signal.md
Normal file
5
docs/book/src/utilities/use_derive_signal.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# use_derive_signal!
|
||||||
|
|
||||||
|
Macro to easily create helper functions that derive a signal using a piece of code.
|
||||||
|
|
||||||
|
See [`is_ok`](is_ok.md) or [`use_to_string`](use_to_string.md) as examples.
|
|
@ -1,3 +1,6 @@
|
||||||
|
/// Macro to easily create helper functions that derive a signal using a piece of code.
|
||||||
|
///
|
||||||
|
/// See [`is_ok`] or [`use_to_string`] as examples.
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! use_derive_signal {
|
macro_rules! use_derive_signal {
|
||||||
(
|
(
|
||||||
|
|
Loading…
Add table
Reference in a new issue