mteb/BrightProStackoverflowRetrieval huggingface dataset:
-includes/script-loader.php ` |  Constructs an inline script tag.   
Used by  |  Description   
---|---  
[ WP_Scripts::print_inline_script() ](https://developer.wordpress.org/reference/classes/wp_scripts/print_inline_script/) ` wp-includes/class-wp-scripts.php ` |  Prints inline scripts registered for a specific handle.   
[ WP_Scripts::do_item() ](https://developer.wordpress.org/reference/classes/wp_scripts/do_item/) ` wp-includes/class-wp-scripts.php ` |  Processes a script dependency.   
  
##  Changelog

Version  |  Description   
---|---  
[ 6.3.0 ](https://developer.wordpress.org/reference/since/6.3.0/) |  Introduced.   
  
##  User Contributed Notes

You must [ log in
](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_scripts%2Fget_inline_script_tag%2F)
before being able to contribute a note or feedback.

  * [ About ](https://wordpress.org/about/)
  * [ News ](https://wordpress.org/news/)
  * [ Hosting ](https://wordpress.org/hosting/)
  * [ Privacy ](https://wordpress.org/about/privacy/)

  * [ Showcase ](https://wordpress.org/showcase/)
  * [ Themes ](https://wordpress.org/themes/)
  * [ Plugins ](https://wordpress.org/plugins/)
  * [ Patterns ](https://wordpress.org/patterns/)

  * [ Learn ](https://learn.wordpress.org/)
  * [ Documentation ](https://wordpress.org/documentation/)
  * [ Developers ](https://developer.wordpress.org/)
  * [ WordPress.tv  ↗  ](https://wordpress.tv/)

  * [ Get Involved ](https://make.wordpress.org/)
  * [ Events ](https://events.wordpress.org/)
  * [ Donate  ↗  ](https://wordpressfoundation.org/donate/)
  * [ Swag Store  ↗  ](https://mercantile.wordpress.org/)

  * [ WordPress.com  ↗  ](https://wordpress.com/?ref=wporg-footer)
  * [ Matt  ↗  ](https://ma.tt/)
  * [ bbPress  ↗  ](https://bbpress.org/)
  * [ BuddyPress  ↗  ](https://buddypress.org/)

[ WordPress.org  ](https://wordpress.org/) [ WordPress.org
](https://wordpress.org/)

  * [ Visit our Facebook page  ](https://www.facebook.com/WordPress/)
  * [ Visit our X (formerly Twitter) account  ](https://www.x.com/WordPress)
  * [ Visit our Instagram account  ](https://www.instagram.com/wordpress/)
  * [ Visit our LinkedIn account  ](https://www.linkedin.com/company/wordpress)
  * [ Visit our YouTube channel  ](https://www.youtube.com/wordpress)

![Code is Poetry](https://s.w.org/style/images/code-is-poetry-for-dark-bg.svg)
before being able to contribute a note or feedback.

  * [ About ](https://wordpress.org/about/)
  * [ News ](https://wordpress.org/news/)
  * [ Hosting ](https://wordpress.org/hosting/)
  * [ Privacy ](https://wordpress.org/about/privacy/)

  * [ Showcase ](https://wordpress.org/showcase/)
  * [ Themes ](https://wordpress.org/themes/)
  * [ Plugins ](https://wordpress.org/plugins/)
  * [ Patterns ](https://wordpress.org/patterns/)

  * [ Learn ](https://learn.wordpress.org/)
  * [ Documentation ](https://wordpress.org/documentation/)
  * [ Developers ](https://developer.wordpress.org/)
  * [ WordPress.tv  ↗  ](https://wordpress.tv/)

  * [ Get Involved ](https://make.wordpress.org/)
  * [ Events ](https://events.wordpress.org/)
  * [ Donate  ↗  ](https://wordpressfoundation.org/donate/)
  * [ Swag Store  ↗  ](https://mercantile.wordpress.org/)

  * [ WordPress.com  ↗  ](https://wordpress.com/?ref=wporg-footer)
  * [ Matt  ↗  ](https://ma.tt/)
  * [ bbPress  ↗  ](https://bbpress.org/)
  * [ BuddyPress  ↗  ](https://buddypress.org/)

[ WordPress.org  ](https://wordpress.org/) [ WordPress.org
](https://wordpress.org/)

  * [ Visit our Facebook page  ](https://www.facebook.com/WordPress/)
  * [ Visit our X (formerly Twitter) account  ](https://www.x.com/WordPress)
  * [ Visit our Instagram account  ](https://www.instagram.com/wordpress/)
  * [ Visit our LinkedIn account  ](https://www.linkedin.com/company/wordpress)
  * [ Visit our YouTube channel  ](https://www.youtube.com/wordpress)

![Code is Poetry](https://s.w.org/style/images/code-is-poetry-for-dark-bg.svg)
rea)

    
        function wpdocs_add_nonce_to_scripts( $attr ) {

    	if ( 'text/javascript' !== $attr['type'] ) {

    		return $attr;

    	}

    

    	return array(

    		'type' => 'text/javascript',

    		'nonce' => '123',// Your Nonce. Obviously more featured than this example.

    	);

    }

    add_filter( 'wp_inline_script_attributes', 'wpdocs_add_nonce_to_scripts' );

Then, you can use ` 'nonce-123' ` in your CSP Policy, example:  
` "script-src 'self' 'noncoe-123';" `

     * Note that this will override other attributes on the ` script ` tag. Would be better to set ` $attr['nonce'] ` on the existing array rather than return a new array. 

[ crstauf ](https://profiles.wordpress.org/crstauf/) [ 5 months ago
](https://developer.wordpress.org/reference/functions/wp_get_inline_script_tag/#comment-6749)

[ Log in to add feedback
](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_get_inline_script_tag%2F%3Freplytocom%3D6744%23feedback-
editor-6744)

You must [ log in
](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_get_inline_script_tag%2F)
before being able to contribute a note or feedback.

  * [ About ](https://wordpress.org/about/)
  * [ News ](https://wordpress.org/news/)
  * [ Hosting ](https://wordpress.org/hosting/)
  * [ Privacy ](https://wordpress.org/about/privacy/)

  * [ Showcase ](https://wordpress.org/showcase/)
  * [ Themes ](https://wordpress.org/themes/)
  * [ Plugins ](https://wordpress.org/plugins/)
  * [ Patterns ](https://wordpress.org/patterns/)

  * [ Learn ](https://learn.wordpress.org/)
  * [ Documentation ](https://wordpress.org/documentation/)
  * [ Developers ](https://developer.wordpress.org/)
  * [ WordPress.tv  ↗  ](https://wordpress.tv/)

  * [ Get Involved ](https://make.wordpress.org/)
  * [ Events ](https://events.wordpress.org/)
  * [ Donate  ↗  ](https://wordpressfoundation.org/donate/)
  * [ Swag Store  ↗  ](https://mercantile.wordpress.org/)

  * [ WordPress.com  ↗  ](https://wordpress.com/?ref=wporg-footer)
  * [ Matt  ↗  ](https://ma.tt/)
  * [ bbPress  ↗  ](https://bbpress.org/)
  * [ BuddyPress  ↗  ](https://buddypress.org/)

[ WordPress.org  ](https://wordpress.org/) [ WordPress.org
](https://wordpress.org/)

  * [ Visit our Facebook page  ](https://www.facebook.com/WordPress/)
  * [ Visit our X (formerly Twitter) account  ](https://www.x.com/WordPress)
  * [ Visit our Instagram account  ](https://www.instagram.com/wordpress/)
  * [ Visit our LinkedIn account  ](https://www.linkedin.com/company/wordpress)
  * [ Visit our YouTube channel  ](https://www.youtube.com/wordpress)

![Code is Poetry](https://s.w.org/style/images/code-is-poetry-for-dark-bg.svg)
files/wp-
includes_class-wp-scripts-php-2/) [ View on Trac
](https://core.trac.wordpress.org/browser/tags/6.5/src/wp-includes/class-wp-
scripts.php#L678) [ View on GitHub ](https://github.com/WordPress/wordpress-
develop/blob/6.5/src/wp-includes/class-wp-scripts.php#L678-L709)

##  Related

Uses  |  Description   
---|---  
[ wp_print_inline_script_tag() ](https://developer.wordpress.org/reference/functions/wp_print_inline_script_tag/) ` wp-includes/script-loader.php ` |  Prints an inline script tag.   
[ load_script_textdomain() ](https://developer.wordpress.org/reference/functions/load_script_textdomain/) ` wp-includes/l10n.php ` |  Loads the script translated strings.   
Used by  |  Description   
---|---  
[ WP_Scripts::do_item() ](https://developer.wordpress.org/reference/classes/wp_scripts/do_item/) ` wp-includes/class-wp-scripts.php ` |  Processes a script dependency.   
  
##  Changelog

Version  |  Description   
---|---  
[ 5.0.0 ](https://developer.wordpress.org/reference/since/5.0.0/) |  Introduced.   
  
##  User Contributed Notes

You must [ log in
](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_scripts%2Fprint_translations%2F)
before being able to contribute a note or feedback.

  * [ About ](https://wordpress.org/about/)
  * [ News ](https://wordpress.org/news/)
  * [ Hosting ](https://wordpress.org/hosting/)
  * [ Privacy ](https://wordpress.org/about/privacy/)

  * [ Showcase ](https://wordpress.org/showcase/)
  * [ Themes ](https://wordpress.org/themes/)
  * [ Plugins ](https://wordpress.org/plugins/)
  * [ Patterns ](https://wordpress.org/patterns/)

  * [ Learn ](https://learn.wordpress.org/)
  * [ Documentation ](https://wordpress.org/documentation/)
  * [ Developers ](https://developer.wordpress.org/)
  * [ WordPress.tv  ↗  ](https://wordpress.tv/)

  * [ Get Involved ](https://make.wordpress.org/)
  * [ Events ](https://events.wordpress.org/)
  * [ Donate  ↗  ](https://wordpressfoundation.org/donate/)
  * [ Swag Store  ↗  ](https://mercantile.wordpress.org/)

  * [ WordPress.com  ↗  ](https://wordpress.com/?ref=wporg-footer)
  * [ Matt  ↗  ](https://ma.tt/)
  * [ bbPress  ↗  ](https://bbpress.org/)
  * [ BuddyPress  ↗  ](https://buddypress.org/)

[ WordPress.org  ](https://wordpress.org/) [ WordPress.org
](https://wordpress.org/)

  * [ Visit our Facebook page  ](https://www.facebook.com/WordPress/)
  * [ Visit our X (formerly Twitter) account  ](https://www.x.com/WordPress)
  * [ Visit our Instagram account  ](https://www.instagram.com/wordpress/)
  * [ Visit our LinkedIn account  ](https://www.linkedin.com/company/wordpress)
  * [ Visit our YouTube channel  ](https://www.youtube.com/wordpress)

![Code is Poetry](https://s.w.org/style/images/code-is-poetry-for-dark-bg.svg)
p#L891-L913)

##  Related

Uses  |  Description   
---|---  
[ WP_Scripts::filter_eligible_strategies() ](https://developer.wordpress.org/reference/classes/wp_scripts/filter_eligible_strategies/) ` wp-includes/class-wp-scripts.php ` |  Filter the list of eligible loading strategies for a script.   
Used by  |  Description   
---|---  
[ WP_Scripts::do_item() ](https://developer.wordpress.org/reference/classes/wp_scripts/do_item/) ` wp-includes/class-wp-scripts.php ` |  Processes a script dependency.   
  
##  Changelog

Version  |  Description   
---|---  
[ 6.3.0 ](https://developer.wordpress.org/reference/since/6.3.0/) |  Introduced.   
  
##  User Contributed Notes

You must [ log in
](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_scripts%2Fget_eligible_loading_strategy%2F)
before being able to contribute a note or feedback.

  * [ About ](https://wordpress.org/about/)
  * [ News ](https://wordpress.org/news/)
  * [ Hosting ](https://wordpress.org/hosting/)
  * [ Privacy ](https://wordpress.org/about/privacy/)

  * [ Showcase ](https://wordpress.org/showcase/)
  * [ Themes ](https://wordpress.org/themes/)
  * [ Plugins ](https://wordpress.org/plugins/)
  * [ Patterns ](https://wordpress.org/patterns/)

  * [ Learn ](https://learn.wordpress.org/)
  * [ Documentation ](https://wordpress.org/documentation/)
  * [ Developers ](https://developer.wordpress.org/)
  * [ WordPress.tv  ↗  ](https://wordpress.tv/)

  * [ Get Involved ](https://make.wordpress.org/)
  * [ Events ](https://events.wordpress.org/)
  * [ Donate  ↗  ](https://wordpressfoundation.org/donate/)
  * [ Swag Store  ↗  ](https://mercantile.wordpress.org/)

  * [ WordPress.com  ↗  ](https://wordpress.com/?ref=wporg-footer)
  * [ Matt  ↗  ](https://ma.tt/)
  * [ bbPress  ↗  ](https://bbpress.org/)
  * [ BuddyPress  ↗  ](https://buddypress.org/)

[ WordPress.org  ](https://wordpress.org/) [ WordPress.org
](https://wordpress.org/)

  * [ Visit our Facebook page  ](https://www.facebook.com/WordPress/)
  * [ Visit our X (formerly Twitter) account  ](https://www.x.com/WordPress)
  * [ Visit our Instagram account  ](https://www.instagram.com/wordpress/)
  * [ Visit our LinkedIn account  ](https://www.linkedin.com/company/wordpress)
  * [ Visit our YouTube channel  ](https://www.youtube.com/wordpress)

![Code is Poetry](https://s.w.org/style/images/code-is-poetry-for-dark-bg.svg)
rect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fapply_filters%2F%23comment-5825
"You must log in to vote on the helpfulness of this note") Vote results for
this note:  -1  [ You must log in to vote on the helpfulness of this note
](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fapply_filters%2F%23comment-5825
"You must log in to vote on the helpfulness of this note")

The second line in the description is technically incorrect:

**“It is possible to create new filter hooks by simply calling this
function…”**

` apply_filters ` doesn’t create filter hooks. Read for [
https://stackoverflow.com/q/72161547/3429430
](https://stackoverflow.com/q/72161547/3429430) details

[ Log in to add feedback
](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fapply_filters%2F%3Freplytocom%3D5825%23feedback-
editor-5825)

You must [ log in
](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fapply_filters%2F)
before being able to contribute a note or feedback.

  * [ About ](https://wordpress.org/about/)
  * [ News ](https://wordpress.org/news/)
  * [ Hosting ](https://wordpress.org/hosting/)
  * [ Privacy ](https://wordpress.org/about/privacy/)

  * [ Showcase ](https://wordpress.org/showcase/)
  * [ Themes ](https://wordpress.org/themes/)
  * [ Plugins ](https://wordpress.org/plugins/)
  * [ Patterns ](https://wordpress.org/patterns/)

  * [ Learn ](https://learn.wordpress.org/)
  * [ Documentation ](https://wordpress.org/documentation/)
  * [ Developers ](https://developer.wordpress.org/)
  * [ WordPress.tv  ↗  ](https://wordpress.tv/)

  * [ Get Involved ](https://make.wordpress.org/)
  * [ Events ](https://events.wordpress.org/)
  * [ Donate  ↗  ](https://wordpressfoundation.org/donate/)
  * [ Swag Store  ↗  ](https://mercantile.wordpress.org/)

  * [ WordPress.com  ↗  ](https://wordpress.com/?ref=wporg-footer)
  * [ Matt  ↗  ](https://ma.tt/)
  * [ bbPress  ↗  ](https://bbpress.org/)
  * [ BuddyPress  ↗  ](https://buddypress.org/)

[ WordPress.org  ](https://wordpress.org/) [ WordPress.org
](https://wordpress.org/)

  * [ Visit our Facebook page  ](https://www.facebook.com/WordPress/)
  * [ Visit our X (formerly Twitter) account  ](https://www.x.com/WordPress)
  * [ Visit our Instagram account  ](https://www.instagram.com/wordpress/)
  * [ Visit our LinkedIn account  ](https://www.linkedin.com/company/wordpress)
  * [ Visit our YouTube channel  ](https://www.youtube.com/wordpress)

![Code is Poetry](https://s.w.org/style/images/code-is-poetry-for-dark-bg.svg)
oader_tag%2F)
before being able to contribute a note or feedback.

  * [ About ](https://wordpress.org/about/)
  * [ News ](https://wordpress.org/news/)
  * [ Hosting ](https://wordpress.org/hosting/)
  * [ Privacy ](https://wordpress.org/about/privacy/)

  * [ Showcase ](https://wordpress.org/showcase/)
  * [ Themes ](https://wordpress.org/themes/)
  * [ Plugins ](https://wordpress.org/plugins/)
  * [ Patterns ](https://wordpress.org/patterns/)

  * [ Learn ](https://learn.wordpress.org/)
  * [ Documentation ](https://wordpress.org/documentation/)
  * [ Developers ](https://developer.wordpress.org/)
  * [ WordPress.tv  ↗  ](https://wordpress.tv/)

  * [ Get Involved ](https://make.wordpress.org/)
  * [ Events ](https://events.wordpress.org/)
  * [ Donate  ↗  ](https://wordpressfoundation.org/donate/)
  * [ Swag Store  ↗  ](https://mercantile.wordpress.org/)

  * [ WordPress.com  ↗  ](https://wordpress.com/?ref=wporg-footer)
  * [ Matt  ↗  ](https://ma.tt/)
  * [ bbPress  ↗  ](https://bbpress.org/)
  * [ BuddyPress  ↗  ](https://buddypress.org/)

[ WordPress.org  ](https://wordpress.org/) [ WordPress.org
](https://wordpress.org/)

  * [ Visit our Facebook page  ](https://www.facebook.com/WordPress/)
  * [ Visit our X (formerly Twitter) account  ](https://www.x.com/WordPress)
  * [ Visit our Instagram account  ](https://www.instagram.com/wordpress/)
  * [ Visit our LinkedIn account  ](https://www.linkedin.com/company/wordpress)
  * [ Visit our YouTube channel  ](https://www.youtube.com/wordpress)

![Code is Poetry](https://s.w.org/style/images/code-is-poetry-for-dark-bg.svg)
##  Creating New Posts

    
    
    import { useState } from 'react'
    import { useDispatch } from 'react-redux'
    import { useNavigate } from 'react-router-dom'
    import { addPost } from '../features/posts/postsSlice'
    
    const CreatePost = () => {
      // Set the initial state for the form
      const [title, setTitle] = useState('')
      const [body, setBody] = useState('')
      const [addPostRequestStatus, setAddPostRequestStatus] = useState('idle')
    
      // Get the dispatch function
      const dispatch = useDispatch()
    
      // Get the navigate function [replace the history.push() method]
      const navigate = useNavigate()
    
      // Handle form field value changes
      const onTitleChange = (e) => setTitle(e.target.value)
      const onBodyChange = (e) => setBody(e.target.value)
    
      /* 
        Get the Boolean value based on whether the form is empty or not && the post request status.
        We use the Boolean value returned to toggle the disbale status submit button
      */
      const canSavePost =
        [title, body].every(Boolean) && addPostRequestStatus === 'idle'
    
      // Handle form submission
      const handleAddPost = async (e) => {
        e.preventDefault()
        const post = { title, body }
        if (canSavePost) {
          try {
            setAddPostRequestStatus('pending')
            await dispatch(addPost(post)).unwrap()
            setTitle('')
            setBody('')
    
            navigate('/')
          } catch (err) {
            console.error('Unable to create post:', err)
          } finally {
            setAddPostRequestStatus('idle')
          }
        }
      }
    
      return (
        <div className="create-post">
          <div className="create-heading">
            <h1>Create Post</h1>
          </div>
          <div className="form-container">
            <h2>Add New Post</h2>
            <form onSubmit={handleAddPost}>
              <div className="form-group">
                <label htmlFor="title">Title</label>
                <input
                  type="text"
                  id="title"
                  name="title"
                  onChange={onTitleChange}
                  value={title}
                />
    
                <label htmlFor="bodyContent">Content</label>
                <textarea
                  id="bodyContent"
                  name="bodyContent"
                  cols="30"
                  rows="10"
                  onChange={onBodyChange}
                  value={body}
                />
    
                <button type="submit" className="btn" disabled={!canSavePost}>
                  Post
                </button>
              </div>
            </form>
          </div>
        </div>
      )
    }
    
    export default CreatePost
3.Form.js

    
    
    import { useState } from "react";
    import { useDispatch, useSelector } from "react-redux";
    // import {
    //   addUser,
    //   addAge,
    //   startUser,
    //   successUser,
    //   errorUser,
    // } from "../redux/userSlice";
    import { postUser } from "../api/api.js";
    
    const Form = () => {
      const [name, setName] = useState("");
      const [age, setAge] = useState("");
      const dispatch = useDispatch();
    
      const { userData, error, loading } = useSelector((state) => state.user);
      console.log(userData, error, loading);
    
      const handleSubmit = (e) => {
        e.preventDefault();
        // this method will update userSlice without api:
        // dispatch(addUser({name, age}));
        // this method will update api and api will update userSlice:
        // console.log(`${name} & ${age}`);
        postUser({ userData, error, loading }, dispatch);
        // dispatch(addUser({name, age}));
      };
    
      return (
        <div>
          <form  onSubmit={handleSubmit}>
            <div>
              <input type="text" onChange={(e) => setName(e.target.value)} value={name}  placeholder="enter name"/>
            </div>
            <div>
              <input type="number" onChange={(e) => setAge(e.target.value)} value={age} placeholder="enter age" />
            </div>
    
            {loading ? (
              "Loading ..........."
            ) : (
              <div>
                <button> Add User </button>
              </div>
            )}
    
            {error && loading === "false" && <span> Something Went Wrong !!!</span>}
          </form>
        </div>
      );
    };
    
    export default Form;
/examples#authentication) , and even [ using RTK Query with other
UI libraries like Svelte ](/rtk-query/usage/examples#svelte) .

Last updated  on ** Oct 29, 2023  **

[ Previous  Codemods  ](/api/codemods) [ Next  Comparison with Other Tools
](/rtk-query/comparison)

  * Motivation 
  * What's included 
    * APIs 
    * Bundle Size 
  * Basic Usage 
    * Create an API Slice 
    * Configure the Store 
    * Use Hooks in Components 
  * Further Information 

Docs

  * [ Getting Started ](/introduction/getting-started)
  * [ Tutorials ](/tutorials/overview)
  * [ Usage Guide ](/usage/usage-guide)
  * [ API Reference ](/api/configureStore)
  * [ RTK Query ](/rtk-query/overview)

Community

  * [ Stack Overflow  ](http://stackoverflow.com/questions/tagged/redux)
  * [ Discord  ](https://discord.gg/0ZcbPKXt5bZ6au5t)

More

  * [ GitHub  ](https://www.github.com/reduxjs/redux-toolkit)
  * [ ![Deploys by Netlify](https://www.netlify.com/img/global/badges/netlify-light.svg) ](https://www.netlify.com)

![Redux Logo](/img/redux_white.svg) ![Redux Logo](/img/redux_white.svg)

Copyright © 2015–2024 Dan Abramov and the Redux documentation authors.
ries)

  * Introduction 
  * ` createApi `
    * Using auto-generated React Hooks 
    * Typing a ` baseQuery `
    * Typing query and mutation ` endpoints `
    * Typing a ` queryFn `
    * Typing ` dispatch ` and ` getState `
    * Typing ` providesTags ` / ` invalidatesTags `
  * Skipping queries with TypeScript using ` skipToken `
  * Type safe error handling 
    * Error result example 
    * Inline error handling example 

Docs

  * [ Getting Started ](/introduction/getting-started)
  * [ Tutorials ](/tutorials/overview)
  * [ Usage Guide ](/usage/usage-guide)
  * [ API Reference ](/api/configureStore)
  * [ RTK Query ](/rtk-query/overview)

Community

  * [ Stack Overflow  ](http://stackoverflow.com/questions/tagged/redux)
  * [ Discord  ](https://discord.gg/0ZcbPKXt5bZ6au5t)

More

  * [ GitHub  ](https://www.github.com/reduxjs/redux-toolkit)
  * [ ![Deploys by Netlify](https://www.netlify.com/img/global/badges/netlify-light.svg) ](https://www.netlify.com)

![Redux Logo](/img/redux_white.svg) ![Redux Logo](/img/redux_white.svg)

Copyright © 2015–2024 Dan Abramov and the Redux documentation authors.
tchEnhancer  ](/api/autoBatchEnhancer) [ Next  createAction
](/api/createAction)

  * Overview 
  * Usage with the "Builder Callback" Notation 
    * Parameters 
    * Example Usage 
    * Builder Methods 
    * ` builder.addCase `
    * ` builder.addMatcher `
    * ` builder.addDefaultCase `
    * Returns 
    * Example Usage 
  * Direct State Mutation 
  * Multiple Case Reducer Execution 
  * Logging Draft State Values 

Docs

  * [ Getting Started ](/introduction/getting-started)
  * [ Tutorials ](/tutorials/overview)
  * [ Usage Guide ](/usage/usage-guide)
  * [ API Reference ](/api/configureStore)
  * [ RTK Query ](/rtk-query/overview)

Community

  * [ Stack Overflow  ](http://stackoverflow.com/questions/tagged/redux)
  * [ Discord  ](https://discord.gg/0ZcbPKXt5bZ6au5t)

More

  * [ GitHub  ](https://www.github.com/reduxjs/redux-toolkit)
  * [ ![Deploys by Netlify](https://www.netlify.com/img/global/badges/netlify-light.svg) ](https://www.netlify.com)

![Redux Logo](/img/redux_white.svg) ![Redux Logo](/img/redux_white.svg)

Copyright © 2015–2024 Dan Abramov and the Redux documentation authors.