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

relightjs

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

relightjs

> Relights you react development.

  • 1.0.0-alpha.3
  • alpha
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Relight

Relights you react development.

尚未发布

Relight 应用框架依赖于尚未正式发布的 react-router-dom@6,因此 Relight 本身也尚未正式发布。

特性

  • 状态管理 (with redux, @redux/toolkit and react-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.

FAQs

Package last updated on 11 Apr 2020

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