- Move useEffect hooks before conditional returns in MessageContent and ThinkingContent - Ensure hooks are called in the same order every render - Fix "Rendered fewer hooks than expected" error when API returns non-200 status - Follow React hooks rules: only call hooks at the top level This prevents the entire page from crashing when API requests fail.
React Template
Basic Usages
# Runs the app in the development mode
npm start
# Builds the app for production to the `build` folder
npm run build
If you want to change the default server, please set REACT_APP_SERVER environment variables before build,
for example: REACT_APP_SERVER=http://your.domain.com.
Before you start editing, make sure your Actions on Save options have Optimize imports & Run Prettier enabled.