Title: Error: Minified React error #321
Last modified: July 15, 2022

---

# Error: Minified React error #321

 *  Resolved [cauemoraes91](https://wordpress.org/support/users/cauemoraes91/)
 * (@cauemoraes91)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/error-minified-react-error-321-2/)
 * Whenever I write a useEffect() inside a component function of my block plugin,
   the edit page goes blank and the console logs the message:
 *     ```
       react_devtools_backend.js:4026 Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
           at Object.it (react-dom.min.js?ver=17.0.1:9:43163)
           at e.useState (react.min.js?ver=17.0.1:9:10899)
           at Prompt (Prompt.js:5:35)
           at N (element.min.js?ver=3dfdc75a0abf30f057df44e9a39abe5b:2:9552)
           at U (element.min.js?ver=3dfdc75a0abf30f057df44e9a39abe5b:2:10502)
           at N (element.min.js?ver=3dfdc75a0abf30f057df44e9a39abe5b:2:9284)
           at lr (blocks.min.js?ver=658a51e7220626e26a92a46af5c2e489:3:111294)
           at blocks.min.js?ver=658a51e7220626e26a92a46af5c2e489:3:137935
           at xn (blocks.min.js?ver=658a51e7220626e26a92a46af5c2e489:3:138073)
           at blocks.min.js?ver=658a51e7220626e26a92a46af5c2e489:3:139086
       ```
   
 * The component:
 *     ```
       import React, { useState, useEffect } from "react";
       import axios from "axios";
   
       function Prompt(props) {
         const [data, setData] = useState({ hits: [] });
   
         useEffect(() => {
           const fetchData = async () => {
             const result = await axios(
               "http://my-site-test.local/wp-json/wp/v2/posts?_fields[]=title"
             );
   
             setData(result.data);
           };
   
           fetchData();
         }, []);
   
         console.log(data);
   
         return (
           <>
             <h5>Hello World</h5>
           </>
         );
       }
   
       export default Prompt;
       ```
   
 * I tried to delete node_modules and reinstall to no avail…

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-minified-react-error-321-2/#post-15842943)
 * Hi there – for help with custom development, the development forum is probably
   a better place for your question, so feel free to ask there:
 * [https://wordpress.org/support/forum/wp-advanced/](https://wordpress.org/support/forum/wp-advanced/)
 *  Thread Starter [cauemoraes91](https://wordpress.org/support/users/cauemoraes91/)
 * (@cauemoraes91)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-minified-react-error-321-2/#post-15843629)
 * Thanks for the reply, I figured out what was wrong and detailed it here [https://stackoverflow.com/questions/72989907/error-minified-react-error-321-on-wordpress-custom-block-plugin/73012823#73012823](https://stackoverflow.com/questions/72989907/error-minified-react-error-321-on-wordpress-custom-block-plugin/73012823#73012823)
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-minified-react-error-321-2/#post-15843662)
 * Excellent, glad you got it sorted, and thanks for pointing to the details in 
   case it helps others.
 * I’ll mark this thread as resolved.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Error: Minified React error #321’ is closed to new replies.

 * ![](https://ps.w.org/gutenberg/assets/icon-256x256.jpg?rev=1776042)
 * [Gutenberg](https://wordpress.org/plugins/gutenberg/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gutenberg/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gutenberg/)
 * [Active Topics](https://wordpress.org/support/plugin/gutenberg/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gutenberg/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gutenberg/reviews/)

## Tags

 * [block](https://wordpress.org/support/topic-tag/block/)
 * [gutenberg](https://wordpress.org/support/topic-tag/gutenberg/)

 * 3 replies
 * 2 participants
 * Last reply from: [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/error-minified-react-error-321-2/#post-15843662)
 * Status: resolved