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

mikasa

v0.2.0

Published

Framework for rendering react server-side

Readme

Documentation is outdated, will update it soon.

Demo

A simple demo of mikasa using iTunes Api: Demo

mikasa

A simple wrapper for server side rendering isomorphic react. It uses Koa.js as webserver, Redux and React-router for routing.

Configuration

| Parameters | Type | Description | | ------------- |:------------------:| ----- | | port | Number | The port that webserver will run on | | routes | Array | An Array of Route Objects | | static | Object | An configuration object | | layout | React Component | The React Component that will be used as layout | | store | Object | An Object containing the redux reducer and the initialState | | promises | Array | An array of promises that need to be resolved before any render from server side |

Routes

Routes are based on routes from react-router, they must be specified as an array of objects that must contain the following attributes.

| Parameters | Type | Description | | ------------- |:------------------:| ----- | | path | String | The route path, for example: /about | | exact | Boolean | Exact parameter from react-router | | component | React Component | The component that will be rendered for that route | | loadData | Function | A function used for doing asynchronus actions before the render of the component. It must return a promise or an array of promises. The function takes three parameters: The context parameter from koa that contains the request, a shared object, and the redux store object for the dispatches before the render. |

Static

The static object must contain the following attributes.

| Parameters | Type | Description | | ------------- |:------------------:| ----- | | path | String | The path that will be used in browser, for exmaple: /public | | local | String | The path to folder containing the static files. | | options | Object | This object is used as options for koa-static. example: { gzip: true } |

Store

The store object is used to create the redux storage on the backend. It must contain the following attributes:

| Parameters | Type | Description | | ------------- |:------------------:| ----- | | reducer | Function | It can be a simple reducer or a combined reducer. | | initialState | Object | This will be used as initialState for the redux. |

Example


import initialState from './store/default'
import reducer from './reducers'
import Layout from './components/layout'
const mikasa = require('mikasa')

mikasa({
        port: 3002,
        routes: routes,
        static: {
            path: '/public',
            local: './static',
            options: {
                gzip: true,
            }
        },
        layout: Layout,
        store: {
            initialState: initialState,
            reducer: reducer,
        },
        promises: [],
    })
}

Usage in browser

For the the browser usage import mikasa/browser. The configuration object is similar to the server one and it must contain the following attributes:

| Parameters | Type | Description | | ------------- |:------------------:| ----- | | reducer | Function | It can be a simple reducer or a combined reducer. | | routes | Array | An Array of Route Objects. | | layout | React Component | The React Component that will be used as layout. |

Example in browser

import mikasa from 'mikasa/browser'
import reducer from '/reducers'
import routes from '/routes'
import layout from '/components/layout'

mikasa({
    reducer: reducer,
    routes: routes,
    layout: layout,
})