react-openapi-client icon indicating copy to clipboard operation
react-openapi-client copied to clipboard

Retry When Network is Down at Startup

Open mwaeckerlin opened this issue 3 years ago • 1 comments

  • Updates dependencies to latest (React 18)
  • Adds a retry option in milliseconds to the provider: Retries to read the JSON file and to initialize the service when it is down at startup.
  • Adds an internal status ready that is set to false when API init failed.
  • API calls are only executed, once ready is true

Tests still succeed, but I haven't added new tests for the new feature.

See: #52

mwaeckerlin avatar Sep 18 '22 15:09 mwaeckerlin

Somehow does not work that way... Could eventually be a problem of calling setState in a timed function?

mwaeckerlin avatar Sep 18 '22 20:09 mwaeckerlin