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 🙏

© 2026 – Pkg Stats / Ryan Hefner

redux-ghost

v0.1.0

Published

Redux state handler and api wrapper for Ghost Blog

Downloads

15

Readme

redux-ghost

npm version

Installation

npm install --save redux-ghost

Getting Started

Step 1

Enable your Ghost blog to expose a public api following this tutorial. Make note of your client_id, client_secret and host (e.g. http://localhost:2368).

Step 2

For a quick test, follow the example, otherwise configure redux ghost with your credentials in step 1 and give the Ghost reducer to redux. Ensure you also include the thunk middleware.

import { createStore, combineReducers, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import ReduxGhost, { reducer as ghostReducer } from 'redux-ghost';

ReduxGhost.config({
  host: '', // e.g. http://localhost:2368
  clientId: '', // e.g. ghost-frontend
  clientSecret: '', // e.g. 4837a41df11b
});

const rootReducer = combineReducers({
  blog: ghostReducer,
});

const store = createStore(rootReducer, null, applyMiddleware(thunk));

Step 3

Set up your store as you normally would, and fire off those actions.

import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { actions } from 'redux-ghost';

const App = ({ actions, blog }) => {
  return (
    <div>
      <button onClick={() => actions.getPosts()}>Load Posts</button>
      {blog.posts.data && blog.posts.data.map((post, index) => (
        <div key={index}>
          <h2>{post.title}</h2>
          <p>Published on: {post.published_at}</p>
          <p>Slug: {post.slug}</p>
        </div>
      ))}
    </div>
  );
}

const mapStateToProps = ({ blog }) => ({
  blog,
});

const mapDispatchToProps = (dispatch) => ({
  actions: bindActionCreators(actions, dispatch)
});

export default connect(
  mapStateToProps,
  mapDispatchToProps,
)(App);

Actions

Call your actions how you like, I prefer binding mine to props using bindActionCreators.

Actions available:

| Action | Arguments | | ------------- | ----------------------------------------------------------------------------- | | getPosts | options (object) | | getPost | id (string / integer), options (object) | | getPostBySlug | slug (string), options (object) | | getTags | options (object) | | getTag | id (string / integer), options (object) | | getTagBySlug | slug (string), options (object) | | getUsers | options (object) | | getUser | id (string / integer), options (object) | | getUserBySlug | slug (string), options (object) | | reset | |

Development

Build

Run nvm use; redux-ghost; npm install; npm run build. Any further file changes will require another npm run build.

Example

nvm use; npm link; cd example; npm link redux-ghost; npm install; npm start.

Open http://localhost:3030/.

Any new builds will automatically refresh the example with updates.