Skip to content

Latest commit

 

History

History
1104 lines (666 loc) · 49.3 KB

CHANGELOG.md

File metadata and controls

1104 lines (666 loc) · 49.3 KB

@flopflip/react-redux

14.0.2

Patch Changes

14.0.1

Patch Changes

14.0.0

Patch Changes

13.6.0

Patch Changes

13.5.2

Patch Changes

13.5.1

Patch Changes

13.5.0

Patch Changes

13.4.1

Patch Changes

13.4.0

Patch Changes

13.3.4

Patch Changes

13.3.3

Patch Changes

13.3.2

Patch Changes

13.3.1

Patch Changes

13.3.0

Patch Changes

13.2.3

Patch Changes

13.2.2

Patch Changes

13.2.1

Patch Changes

13.2.0

Minor Changes

  • #1848 2f75a14 Thanks @CarlosCortizasCT! - Included a new hook that allows a consumer to read all the flags configured in the FlopFlip context.

    Example:

    import { useAllFeatureToggles } from '@flopflip/react-broadcast';
    
    const MyComponent = () => {
      const allFeatureToggles = useAllFeatureToggles();
    
      return (
        <div>
          {allFeatureToggles.map(({ featureName, featureValue }) => (
            <div key={id}>
              <span>Feature name: {featureName}</span>
              <span>Feature value: {featureValue}</span>
            </div>
          ))}
        </div>
      );
    };

Patch Changes

13.1.8

Patch Changes

13.1.7

Patch Changes

13.1.6

Patch Changes

13.1.5

Patch Changes

13.1.4

Patch Changes

13.1.3

Patch Changes

13.1.2

Patch Changes

13.1.1

Patch Changes

13.1.0

Minor Changes

  • #1797 34c4b6fd Thanks @tdeekens! - The useAdapterStatus hooks now allow to fetch status of one or more adapters instead of always all.

    You can pass the adapterIdentifiers argument which is of type TAdapterIdentifiers[]. This means you can:

    const status = useAdapterStatus({ adapterIdentifiers: ['http', 'memory] });

    This returns isConfigured once both adapters have reached the configurd state.

Patch Changes

13.0.4

Patch Changes

13.0.3

Patch Changes

13.0.2

Patch Changes

13.0.1

Patch Changes

13.0.0

Patch Changes

12.5.6

Patch Changes

12.5.5

Patch Changes

12.5.4

Patch Changes

12.5.3

Patch Changes

12.5.2

Patch Changes

12.5.1

Patch Changes

12.5.0

Minor Changes

Patch Changes

12.4.0

Patch Changes

12.3.8

Patch Changes

12.3.7

Patch Changes

12.3.6

Patch Changes

12.3.4

Patch Changes

12.3.3

Patch Changes

12.3.2

Patch Changes

12.3.1

Patch Changes

12.3.0

Minor Changes

Patch Changes

12.2.0

Minor Changes

Patch Changes

12.1.25

Patch Changes

12.1.24

Patch Changes

12.1.23

Patch Changes

12.1.22

Patch Changes

12.1.21

Patch Changes

12.1.20

Patch Changes

12.1.19

Patch Changes

12.1.18

Patch Changes

12.1.17

Patch Changes

12.1.16

Patch Changes

12.1.15

Patch Changes

12.1.14

Patch Changes

12.1.13

Patch Changes

12.1.12

Patch Changes

12.1.11

Patch Changes

12.1.10

Patch Changes

12.1.9

Patch Changes

12.1.8

Patch Changes

12.1.7

Patch Changes

12.1.6

Patch Changes

12.1.5

Patch Changes

12.1.4

Patch Changes

12.1.3

Patch Changes

12.1.2

Patch Changes

12.1.1

Patch Changes

12.1.0

Minor Changes

  • 57c90be #1374 Thanks @tdeekens! - feat: add support for number json variations

    Prior to this @flopflip supported sttring or boolean variations. With it it also supports JSON variations (as LaunchDarkly calls them). For @flopflip these variations are of type Record<string, unknown> or unknown[]. In the future we might allow passing in a generic to narrow down the type.

Patch Changes

12.0.1

Patch Changes

12.0.0

Major Changes

  • 3d2a174 #1367 Thanks @tdeekens! - feat: allow adapters to affect each others state

    An adapter can now have an effectIds besides its own id. This allows one adapter to effect other adapters state. In turn allowing flopflip to theoretically support multiple adapters.

  • 41d403e #1366 Thanks @tdeekens! - refactor: adapters to have own state slice

    The react-redux package has one potential breaking change. If you used selectFlags and/or or selectFlag directly then you will have to use their new signature.

    -useSelector(selectFlags);
    +useSelector(selectFlags());
    -useSelector(selectFlag('fooFlag');
    +useSelector(selectFlag([adapter.id], 'fooFlag'));

    In the second example memory could be id of your adapter. In the future we plan to support multiple adapters resulting in an array being passed.

    Note that in other locations, e.g. with useFeatureToggle we now which adapter you are using as we retrive it from the adapter context.

Patch Changes

  • b099b51 #1362 Thanks @tdeekens! - refactor: updateFlags to be only on adapter

    The updateFlags export from each adapter is no longer present. Please use the adapter.updateFlags function instead. The prior was a re-export of the latter for longer anyway.

    This affects also other locations you should hopefully not be affected by:

    1. test-utils: does not export updateFlags anymore. Use adapter.updateFlags
    2. Globals: The globals on the window do not contain a window.__flopflip__.[id].updateFlags anymore

11.0.13

Patch Changes

11.0.12

Patch Changes

11.0.11

Patch Changes

11.0.10

Patch Changes

11.0.9

Patch Changes

11.0.8

Patch Changes

11.0.7

Patch Changes

11.0.6

Patch Changes

11.0.5

Patch Changes

11.0.4

Patch Changes

11.0.3

Patch Changes

11.0.2

Patch Changes

11.0.1

Patch Changes

11.0.0

Major Changes

  • 891fb29 #1287 Thanks @renovate! - flopflip is now built with TypeScript v4 which can cause compatibility issues if you project runs on an older version of TypeScript

Patch Changes

10.2.8

Patch Changes

10.2.7

Patch Changes

10.2.6

Patch Changes

10.2.5

Patch Changes

10.2.4

Patch Changes

10.2.3

Patch Changes

10.2.2

Patch Changes

10.2.1

Patch Changes

10.2.0

Minor Changes

  • bafdc4b #1110 Thanks @tdeekens! - feat: add use-flag-variations

    You can use evaluate multiple flag variations at the same time:

    const [variation1, variation2] = useFlagVariations([
      FLAG.VARIATION_A,
      FLAG.VARIATION_B,
    ]);

    Is the same as:

    const variation1 = useFlagVariation(FLAG.VARIATION_A);
    const variation2 = useFlagVariation(FLAG.VARIATION_B);
  • 8ce10a9 #1106 Thanks @tdeekens! - feat: add use-flag-variation hook

    You can now conveniently a flag variation without evaluating its actual state (as with useFeatureToggle).

    const variation = useFlagVariation('myFlagName');
    
    const isAEnabled = variation === VARIATION_A;
    const isBEnabled = variation === VARIATION_B;
    
    // Is the same as
    
    const isAEnabled = useFlagVariation('myFlagName', VARIATION_A);
    const isBEnabled = useFlagVariation('myFlagName', VARIATION_B);

    Using useFlagVariation is often a bit more concise if you want to work with the variation value yourself.

Patch Changes

10.1.16

Patch Changes

10.1.15

Patch Changes