How to use tweek-local-cache - 1 common examples

To help you get started, we’ve selected a few tweek-local-cache examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Soluto / tweek / services / editor / src / contexts / Tweek.js View on Github external
if (!user) {
      return;
    }

    const context = toTweekContext(user);

    if (tweekRepository) {
      tweekRepository.updateContext((prev) => {
        if (equals(prev, context)) {
          return null;
        }
        return context;
      });
    } else {
      setTweekRepository(
        new TweekRepository({
          client: tweekClient,
          context,
        }),
      );
    }
  }, [user]);

tweek-local-cache

Local cache to be used with tweek-client

MIT
Latest version published 4 years ago

Package Health Score

48 / 100
Full package analysis

Popular tweek-local-cache functions

Similar packages