Bug: StrictMode issue with api request calls

This issue has been created since 2022-09-21.

In react strict mode whenever I call API.
It got hit twice.
but without strict mode it works fine.
React version: 18

wenzi0github wrote this answer on 2022-09-21

This question has been discuessed. The following links may help you solve the problem:

#24502

#24455

More Details About Repo
Owner Name facebook
Repo Name react
Full Name facebook/react
Language JavaScript
Created Date 2013-05-24
Updated Date 2022-09-26
Star Count 195293
Watcher Count 6655
Fork Count 40426
Issue Count 1113

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Cannot record livestream with mobile's resolution 7 2022-01-11 2022-09-17
Add kubeconfig path to kubectl and oc commands 0 2021-07-20 2022-09-11
discussion: how can we minimize unintentional stake centralization in top validators? 1 2022-07-03 2022-09-16
Neo4j getLineage with multi-hop support 1 2022-09-20 2022-09-19
🚀 Feature Request: Deployment Rollback 1 2022-07-02 2022-09-02
Don't run `npm install` on every local doc build 2 2021-03-10 2022-09-05
Bug: min/max is not working in number 1 2021-04-24 2022-09-19
espflash 1.3 reports "No serial port specified" 24 2022-02-18 2022-09-17
Dependency Dashboard 0 2021-10-20 2022-09-26
Error in atexit._run_exitfuncs: 1 2022-01-25 2022-09-07
Full Ettercap sniffing/dissecting while completely ignoring port 80 1 2021-03-08 2022-09-21
Hex and binary literals are not supported 1 2021-09-15 2022-07-23
distinguish between click and drag 1 2019-07-30 2022-09-26
MyersDiff: `DEFAULT_EQUALIZER` should not be reused per instance 2 2021-03-21 2022-09-02
consult-line makes subsequent navigation in large file buffer very slow 12 2022-02-19 2022-09-14
An unexpected error occurred: KeyError - 'x_src'. 6 2022-07-22 2022-08-28
A mention of the base MAC address Tlv offset on the website is wrong 0 2022-09-22 2022-09-19
Onie integration issue for custom board. 1 2022-07-14 2022-09-19
HarmonyPatchAttribute with string type 8 2021-01-15 2022-08-02
Could add a demo for DoH async client ? 1 2022-09-10 2022-09-21
Doesn't work with Create React App's build script 14 2017-12-21 2022-08-31
Support empty strings in compile 6 2018-10-31 2022-09-05
Add Signature Spoofing & microG Support 12 2021-10-02 2022-09-08
state store query API: validate changes in the syntax of query JSON 2 2022-02-14 2022-09-14
multiple types of labelling attributes may affect results. (skim) 12 2020-07-16 2022-09-25
Return value of setGlobalXXX doesn't match documentation 2 2021-04-06 2022-09-26
Consider to remove IntExemplar and offer only DoubleExemplar (a.k.a Exemplar) 1 2021-02-12 2022-09-21
How to install OpenCL SDK for FreeBSD? 0 2022-09-24 2022-09-26
moq generates mocks with internal package imports 4 2021-08-19 2022-09-26
Updating the downstream project description in MELPA Wiki 2 2022-08-24 2022-09-09
[enterprise-logs] extraArgs is an object but in loki-distributed it is an array 0 2021-11-26 2022-09-11
Zephyr misses strict aliasing disabling 6 2022-04-01 2022-07-11
Queue: doesn't autoplay if m3u8 file exists 0 2022-08-23 2022-09-16
migration_snapshot generates invalid column types (tinyint) 24 2018-03-15 2022-09-20
The I3S app does not work on Safari browsers. 0 2022-08-18 2022-08-29
Reached maximum number of Ethernet ports 5 2021-12-17 2022-09-19
Traffic Generator not getting data packets. 7 2022-02-17 2022-09-19
Issues when connecting to Azure managed identity 1 2022-01-10 2022-08-28
Cannot clone a disposed image 1 2022-04-21 2022-09-19
Accepts phone numbers more than 10 digits in profile settings 11 2020-01-22 2022-09-18
[java] Improve AvoidUsingOctalValues documentation 0 2021-07-11 2022-08-08
fatal: not a git repository (or any parent up to mount point /github) 2 2021-05-26 2022-07-11
pallet::call macro does not preserve lint attributes 1 2022-09-19 2022-09-19
Use glog loop record in the for loop, the final record is incomplete 2 2021-07-23 2022-09-20
Print page does not work after site has been deployed to GitHub Pages 8 2021-01-20 2022-08-29
Recursive JSON object type hint not working 1 2022-04-09 2022-09-04
Is setting a "Source IP" on an AWS ALB possible? 2 2022-07-08 2022-09-26
Error: Failed to construct REST client on kubernetes_manifest resource 9 2022-07-08 2022-09-19
Input inside modal inside dropdown overlay not responding to arrow keys 5 2022-02-18 2022-08-17
Query: Bulk Delete on result of First family in projection 2 2022-07-26 2022-09-26