New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cherrytree-for-react

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cherrytree-for-react - npm Package Compare versions

Comparing version 1.0.1 to 1.1.1

5

package.json
{
"name": "cherrytree-for-react",
"version": "1.0.1",
"version": "1.1.1",
"description": "An adapter for cherrytree router for using it with React",

@@ -13,5 +13,2 @@ "main": "./lib/cherrytreeForReact",

"license": "ISC",
"peerDependencies": {
"react": "^0.13.3"
},
"devDependencies": {

@@ -18,0 +15,0 @@ "babel": "^5.8.21",

27

README.md

@@ -7,3 +7,3 @@ # cherrytree-for-react

$ npm install --save cherrytree cherrytree-for-react
$ npm install --save react cherrytree cherrytree-for-react

@@ -17,6 +17,2 @@ ```js

import { Provider } from 'redux/react'
import { createDispatcher, createRedux, composeStores } from 'redux'
import * as stores from './stores'
const {

@@ -30,22 +26,8 @@ Application,

const redux = createRedux(createDispatcher(composeStores(stores)))
const cherrytree = createCherrytree().map(routes)
const cherrytree = createCherrytree()
.map(routes)
.use(function redirect (transition) {
transition.routes.map(route => {
if (route.options.redirect)
cherrytree.replaceWith.apply(cherrytree, route.options.redirect)
})
})
.use(function error (transition) {
transition.catch(err => console.error(err.stack))
})
export default class App extends React.Component {
render () {
return (
<Provider redux={redux}>
{() => <Router router={cherrytree} />}
</Provider>
<Router router={cherrytree} />
)

@@ -62,3 +44,2 @@ }

})
route('index', { path: '', redirect: [ 'user', { username: 'KidkArolis' }] })
})

@@ -68,4 +49,2 @@ }

Note: this example demonstrates how you'd use `cherrytree-for-react` with `redux`. If you don't use `redux`, simply use `Router` component at the top level, instead of the `Provider`.
The router will be injected into the context of the render tree. You can use it to generate links or initiate transitions, e.g.

@@ -72,0 +51,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc