Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

icestark

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

icestark

Icestark is a JavaScript library for multiple react projects, Ice workbench solution.

  • 0.0.5
  • Source
  • npm
  • Socket score

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

icestark

Icestark is a JavaScript library for multiple react projects, Ice workbench solution.

NPM version Package Quality build status Test coverage NPM downloads David deps

Installation

npm install icestark --save

Example

import React from 'react';
import ReactDOM from 'react-dom';
import { AppRouter, AppRoute } from 'icestark';

class Layout extends React.Component {
  onRouteChange = (pathname, query) => {
    console.log(pathname, query);
  }

  render() {
    return (
      <div>
        <div>this is common header</div>
        <AppRouter
          onRouteChange={this.onRouteChange}
          useShadow
        >
          <AppRoute
            path={['/', '/home', '/about']}
            exact
            title="主页"
            url={['//127.0.0.1:4444/js/index.js', '//127.0.0.1:4444/css/index.css']}
          />
          <AppRoute
            path="/user"
            title="用户页面"
            url={['//127.0.0.1:5555/js/index.js', '//127.0.0.1:5555/css/index.css']}
          />
        </AppRouter>
        <div>this is common footer</div>
      </div>
    );
  }
}

Configuration

AppRouter

PropertyDescriptionTypeDefault
onRouteChangecallback executed when route changedfunctionnoop
NotFoundComponentrender when the route changed errorReactElement
BundleErrorComponentrender when the bundle pulls an errorReactElement
BundleLoadingComponentrender when Bundle is LoadingReactElement
shadowRootwhether to use shadowRootbooleanfalse

AppRoute

PropertyDescriptionTypeDefault
pathapp router path, reference react-router, requiredstring/string[]
urlassets load url, requiredstring/string[]
titledocumentTitlestring
exactreference react-routerbooleanfalse
strictreference react-routerbooleanfalse
sensitivereference react-routerbooleanfalse

Keywords

FAQs

Package last updated on 30 May 2019

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