0.5.3 • Published 2 years ago

@deep-foundation/react-with-packages-installed v0.5.3

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

npm

Goal

This package provides a component that wraps the react hook useArePackageInstalled from the package @deep-foundation/react-use-are-packages-installed. Loading, error, not installed and installed states are handled by the components you pass.

How to use?

<WithPackagesInstalled
  packageNames={["package-name0", "package-name1"]}
  renderIfError={(error) => <div>{error.message}</div>}
  renderIfNotInstalled={(packageNames) => (
    <div>
      {`Install these deep packages to proceed: ${packageNames.join(', ')}`}
    </div>
  )}
  renderIfLoading={() => (
    <Text>Checking if deep packages are installed...</Text>
  )}
  shouldIgnoreResultWhenLoading={true}
>
  <Content />
</WithPackagesInstalled>;
0.5.3

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago

0.4.2

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.5

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago