Page MenuHomePhabricator

[native] Fetch and parse feature flags response
ClosedPublic

Authored by tomek on Mar 3 2023, 4:29 AM.
Tags
None
Referenced Files
F3641892: D6949.diff
Sat, Jan 4, 3:25 PM
F3638278: D6949.diff
Fri, Jan 3, 6:46 PM
Unknown Object (File)
Sun, Dec 29, 9:30 PM
Unknown Object (File)
Sun, Dec 29, 9:30 PM
Unknown Object (File)
Sun, Dec 29, 9:30 PM
Unknown Object (File)
Sun, Dec 29, 9:30 PM
Unknown Object (File)
Sun, Dec 29, 9:27 PM
Unknown Object (File)
Fri, Dec 27, 10:07 PM
Subscribers

Details

Summary

Fetch a config, parse, and use in a state.

Depends on D6948

Test Plan

Added a console log to check if the state is set correctly after successful call to feature flags service.

Diff Detail

Repository
rCOMM Comm
Branch
flags
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested review of this revision.Mar 3 2023, 4:44 AM
lib/utils/feature-flags-utils.js
22–31 ↗(On Diff #23400)
native/components/feature-flags-provider.react.js
53 ↗(On Diff #23400)

This adds more context

lib/utils/feature-flags-utils.js
22–31 ↗(On Diff #23400)

I used the same approach that we use in callServerEndpoint but agree, using .json() might be better.

native/components/feature-flags-provider.react.js
53 ↗(On Diff #23400)

Good idea!

Improve parsing and error handling

This revision is now accepted and ready to land.Mar 3 2023, 7:50 AM