Skip to content

Latest commit

 

History

History
57 lines (40 loc) · 1.24 KB

README.md

File metadata and controls

57 lines (40 loc) · 1.24 KB

expo-license-list

A group of components used to display the licenses your expo app is using

Snack

Usage

Install using npm or yarn:

npm i expo-license-list
yarn add expo-license-list

Generate the license JSON data using the following script (you need npm-license-crawler):

npm-license-crawler -onlyDirectDependencies -json ./assets/licenses.json

Then use like this:

import * as React from 'react';

import {
  LicenseList,
  getLicensesFromJSON,
  LicenseListItem,
} from 'expo-license-list';

import { openBrowserAsync } from "expo-web-browser";

import licenses from './assets/licenses.json';

export default function App() {
  return (
    <LicenseList
      data={getLicensesFromJSON(licenses)}
      renderItem={({ item }) => (
        <LicenseListItem onPress={(url) => openBrowserAsync(url)} {...item} />
      )}
    />
  );
}

See the documentation for more technical info.

ToDo

  • Add tests.