1.1.3 • Published 2 years ago
brains v1.1.3
brains
react 应用注册及启动
use
// App.tsx
import { Route, Switch } from 'legions/router';
import React from 'react';
export default class App extends React.Component {
render() {
return (
<Switch>
<React.Fragment>{this.props.children}</React.Fragment>
</Switch>
);
}
}
// 入口文件 main.ts
import create from 'brains';
import App from './App';
import { createHashHistory, createBrowserHistory, createMemoryHistory } from 'history';
const app = create(options);
app.start(App, '#react-app');
options
- enableDevTools : boolean
开启mobx 调试插件
- history : createHashHistory|createBrowserHistory|createMemoryHistory
路由类型,默认createHashHistory
- router : boolean
是否开启路由,此参数多余,历史原因考虑不周,逐步废弃,传入即可,不必过分关注
Licensing
MIT license
1.1.1
2 years ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.0
3 years ago
1.0.3-beta.1
4 years ago
0.1.10-beta.2
4 years ago
1.0.3-beta
4 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.0
5 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.5
5 years ago
0.1.4
5 years ago
0.1.3
5 years ago
0.1.2
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago
0.0.12
7 years ago
0.0.11
7 years ago
0.0.10
7 years ago
0.0.9
7 years ago
0.0.8
7 years ago
0.0.7
7 years ago
0.0.6
7 years ago
0.0.5
7 years ago
0.0.4
7 years ago
0.0.3
7 years ago
0.0.2
7 years ago
0.0.1
7 years ago
0.0.0
13 years ago