Skip to content

Commit

Permalink
Add API docs for new utils
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Nov 25, 2023
1 parent 97d0992 commit 47cf3a5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/api/utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
id: utils
title: Additional Utilities
hide_title: true
description: 'API > utils: Additional utility functions'
---

 

# Utility Functions

The Redux core exports additional utility functions for reuse.

## `isAction`

Returns true if the parameter is a valid Redux action object (a plain object with a string `type` field).

This also serves as a TypeScript type predicate, which will narrow the TS type to `Action<string>`.

## `isPlainObject`

Returns true if the value appears to be a plain JS object.
1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ module.exports = {
'api/applymiddleware',
'api/bindactioncreators',
'api/compose',
'api/utils',
{ type: 'link', label: 'Error Messages', href: '/errors' }
],
'Redux Toolkit': ['redux-toolkit/overview']
Expand Down

0 comments on commit 47cf3a5

Please sign in to comment.