Skip to content

defaultSerializer ​

Function to serialize any type of value.

Types ​

DefaultSerializerProps ​

  • @template T - The type of the value to serialize.

Parameters accepted by defaultSerializer. A generic serializer that converts a value of type T to its string representation using JSON.stringify. Used as the default serializer in storage hooks and utilities when no custom serializer is provided.

PropertyTypeRequiredDescription
targetT✓

Released under the MIT License.