1.0.0-alpha.4 • Published 6 years ago
relightjs v1.0.0-alpha.4
Relight
Relights you react development.
尚未发布
Relight 应用框架依赖于尚未正式发布的 react-router-dom@6,因此 Relight 本身也尚未正式发布。
特性
- 状态管理 (with redux,@redux/toolkitandreact-redux)
- Routing (with react-router-dom@6)
- Permission based access control
- i18n (with react-intl)
- Exception handling (with React 16 ErrorBoundary)
使用示例
import React from 'react';
import { Relight } from 'relightjs';
import { Route } from 'relightjs/routing';
import config from '@/config';
import Home from '@/views/index';
function App() {
  return (
    <Relight config={config}>
      <Route path="/" element={<Home />} />
    </Relight>
  );
}配置 Relight
interface RelightConfig {
  auth?: {
    reducerKey?: string;
  };
  intl?: {
    locales?: any;
  };
  exception?: {
    view?: React.ComponentType<{ error: Error, errorInfo?: React.ErrorInfo }>;
  };
  routing?: {
    routes?: any[];
    provider?: React.ComponentType<{ routes: any[] }>;
  };
}RSUITE 集成
如果你想在 RSUITE 企业级项目中使用 Relight,推荐使用 Relight RSUITE App 脚手架 (WIP) 创建项目。它会为你配好一套适用于 RSUITE 的 Relight 配置,以便迅速启动 RSUITE 企业级项目原型。
License
MIT Licensed.
1.0.0-alpha.4
6 years ago
1.0.0-alpha.3
6 years ago
1.0.0-alpha.2
6 years ago
1.0.0-alpha.1
6 years ago
1.0.0-alpha.0
6 years ago