Skip to content

Commit

Permalink
Put action encoder documentation back
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMarner committed Jul 27, 2020
1 parent 447c37c commit 51b5267
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/src/action_encoder.dart
Expand Up @@ -5,6 +5,19 @@ part of redux_remote_devtools;
typedef ActionEncoder = String Function(dynamic action);

/// An action encoder that converts an action to stringified JSON
///
/// Encodes an action as stringified JSON
///
/// Uses the form:
///
/// {
/// "type": "TYPE"
/// "payload": jsonEncode(action)
/// }
///
/// Action type is set to be the class name for class based
/// actions, or an enum value for enum actions
///
ActionEncoder JsonActionEncoder = (dynamic action) {
/// Gets a type name for the action, based on the class name or value
String getActionType(dynamic action) {
Expand Down

0 comments on commit 51b5267

Please sign in to comment.