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

roc-web-react

v1.0.0-beta7

Published

React base extension for Roc Applications

Downloads

7

Readme

roc-web-react

stability beta roc build status Coverage Status Code Climate Issue Count Dependency Status

Base extension for reactive web applications built on Roc.
Extends roc-web with React, React Router and Redux and more.

How to build an application

First make sure to install roc by following the main steps at Bootstrap Redux + React application

After these steps you should have roc available globally and be in the directory of your newly generated project that uses roc-web-react.

Simple: use provided entrypoints

When creating an application based on roc-web-react you can define routes and reducers. Routes provide an easy way map URL resources onto React components. Reducers manages application state.
Roc will look for routes and reducers by convention (routes.js, reducers.js), but this can also be configured in a roc.config.js in your project or by using the cli. Here are some example integration points.

routes.js

import React from 'react';
import { Route, IndexRoute } from 'react-router';

import Main from './maincomponent'; // define this react component in your app

export default () => (
    <Route>
        <IndexRoute component={ Main } />
    </Route>
);

reducers.js

...
export default function reducer(state, action) {
    if (action.type === MY_ACTION) {
        // return new state
    }
}

Placeholder code will be generated for you and it will be similar to the examples above when using the default base-web-react.

Complex: define your own entrypoints and middlewares

This will be documented in the future.

Get started developing on Roc stack itself (advanced users only)

Prerequisite: You have set up and linked roc-web locally.

There are some examples in examples/ that show how roc-web-react can be used directly. To test them out you will need to run npm link to connect them to your checked out version of roc-web-react. A good workflow is then to modify roc-web-react while experimenting in an example app.

  1. Run npm install in the base of roc-web-react.
  2. Run npm run build in the base of roc-web-react.
  3. Run npm link in the base of roc-web-react.
  4. Run npm run build -- --watch in the base of roc-web-react.
  5. Go to the example you want and run npm link roc-web-react.
  6. Using the roc cli run roc dev to get started. Some example may need some extra parameters set to roc dev

Inherited from roc-web

Same configuration concepts apply.
Read details at roc-web