New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-app-init

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-app-init

start redux/react app with initial data call

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

React App Init

install

npm install react-app-init --save

what ?

React App Init is an opinionated simple way to kick off a react/redux app without any of the weird imperative stuff in your root componentDidMount

how ?

import store from '../store';
import App from './app';
import init from './init';
import { loadData } from '../actions';

init(<App />, { store, init: [loadData] });

React App init will put the store into Provider, and call dispatch on all actions in the init array. You can optionally pass in a renderTarget using something like { store, init: [loadData], renderTarget: document.getElementById('app') }); but if you do not one will be created for you.

why ?

Because I want to remove this boilerplate from my life and think this looks like a much cleaner way to start an app and I like being able to declaritevely show the actions needed to load my app without searching for the root componentDidMount. Inspired by StartApp and the elm architechture.

Keywords

redux

FAQs

Package last updated on 27 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts