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

xander

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xander

Single page app framework

  • 0.6.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

xander

CircleCI

Overview

Single Page App Framework, built on React.

Look at example for minimal webpack setup.

Usage

Installation

npm install --save xander

Quick start

A minimal app with home and 404 page.

import React from 'react';
import ReactDOM from 'react-dom';
import app from 'xander';

let App = app({
  routes: [{
    path: '/',
    component: (props) => <div>Hello, World.</div> 
  }, {
    path: '*',
    component: (props) => <div>404</div>
  }])

})

ReactDOM.render(<App />, document.body)

Router

var { router } = require('xander')
var { loadRoutes } = require('xander')

loadRoutes({
  routes: [{
    path: '/',
    load: () => System.import('./HomePage')
  }, {
    path: '*',
    component: (props) => <div>404</div>
  }])

Container Component

A component to render the current route content.

import {Container} from 'xander'
render( <Container router={...} location={...} />, document.all.root )

A link component to hyperlink your app without annoying page refreshes.

import {Link} from 'xander'
<Link to="/buckets" />
<Link type="button" to="/buckets" />

Open path programmically

Manage location with the easy to use API.

import {location} from 'xander'
location.open('/buckets/1')

Use redirect to change the URL without adding an entry to the history state.

location.redirect('/buckets')

Replace routes

Routes and related location information stored as routes.

loadRoutes([{
  path: '/',
  load: loadContent( System.import('./pages/home') )
}])

Manage state with stores

Create custom stores with reducer function.

createStore(name, reducerOrSpec)`

Keywords

FAQs

Package last updated on 25 Nov 2017

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

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