npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@uselumin/react-native

v0.5.1

Published

Lumin React Native SDK

Downloads

51

Readme

@uselumin/react-native

The Lumin SDK for React Native apps.

Installation

Without Expo

npm install @uselumin/react-native @react-native-async-storage/async-storage

Then run:

npx pod-install

With Expo

npx expo install @uselumin/react-native @react-native-async-storage/async-storage

There's no need to run npx pod-install when using Expo.

Usage

import { Lumin } from '@uselumin/react-native';

// ...

const lumin = new Lumin("<yourLuminToken>");

lumin.init();

You can find your app's token in the app's settings on Lumin.

Sending Custom Events

If you want to send custom events that are then counted and displayed by Lumin, you can use the following function:

lumin.trackCustomEvent("EVENT_NAME", {
    // ... any additional JSON data you might want to pass.
    // Lumin doesn't do anything with this data (yet), but it will be saved and part of any data exports.
});

Why is async-storage needed?

Lumin's goal is not to collect and persist any data would allow anyone to differentiate one user from another. Data of this kind is often called personally identifiable information (PII), and it's what GDPR is all about. This poses a problem though: to say that someone using your app is a "daily active user" (DAU) or even a "monthly active user" (MAU), we need a way to tell if this person has used your app before and when. (e.g. if they used the app earlier today) So we need a way to record the last time someone was counted as a DAU and then see if that time was before the beginning of the current day. If it was, they are a DAU for today. But if it wasn't, that means that they already opened the app earlier today and they won't be counted again. All this has to happen on the user's device, because, again, we don't want to save any PII. That's what we use async-storage for: the timestamps of the last time a user (or really, a device) was counted as a DAU, WAU, MAU or YAU.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library