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

configly-react

v0.2.2

Published

Configly library for react

Downloads

18

Readme

Configly React Library

The React library for Configly: the modern config/static data key/value store.

npm GitHub

Table of Contents

What is Configly?

Configly is the place software developers put their static / config data—like copy, styling, and minor configuration values. They can then update that data directly from https://www.config.ly without having to wait for a deploy process / app store review. Their app or webapp receives the data near instantly. Non-technical folks themselves can publish changes freeing developers to focus on hard software problems and not copy tweaks.

On the backend, Configly provides a read-optimized static-data key/value store built with the aim of being low-latency, and high-availability. The client libraries are made to be dead-simple, lean, and efficient (via enhancements like caching). There is a fancy web UI called the Configulator for setting and updating the configs as well as seeing things like change history. Configly is built for modern software development.

There are a host of other benefits to using Configly ( such as ensuring you do not have data duplicated across clients, reducing load on your primary DB, and better tolerance for traffic spikes), read more about the benefits at Configly.

Core Features

  • API to fetch Strings, JSON Blobs (arrays and objects), Booleans, and Numbers from the Configly backend
  • Web interface for modifying these values without having to deploy code (we call our beloved web interface the Configulator).
  • High availability, high-throughput, low-latency backend.
  • Smart caching on the client libraries to minimize server requests.
  • Client libraries available in an expanding amount of languages.

Getting Started

Get your API Key

You'll need a Configly account. Registration is lightning quick—you can register via visiting https://www.config.ly/signup.

After signing up, you can grab your API Key from https://www.config.ly/register. You'll need your API Key to setup the API below.

Library installation

npm install configly-react

Usage

You will need to specify your API key using a ConfiglyContext Provider. This should be done at the root of your app.

  import {ConfiglyText, ConfiglyDropdown, ConfiglyContext} from 'configly-react';
  <ConfiglyContext.Provider value={{apiKey: 'MY_API_KEY'}}>
    <div className="App"></div>
  </ConfiglyContext.Provider>

You can then use the predefined components to display text or dropdowns

<ConfiglyText prop="hello"/></ConfiglyText>
<ConfiglyDropdown prop="hello-dropdown"/>

If you want to provide a default value that will display before the value is loaded, use the default parameter. The default value will be run through the component's render function.

To render a custom component, you will pass a render function to the ConfiglyComponent. It takes a single argument, which is the value returned by Configly.

function renderCustom(value) {
  return(<span>
    <input type="checkbox" checked={value} />
  </span>);
}
<ConfiglyComponent prop="hello-custom" render={renderCustom} />

Example

You can run the sample app located in the demo folder for a working example.

License

This repository is published under the MIT license.