typeless

typeless

  • Docs
  • API
  • Github

›Using typeless

Introduction

  • Quick Start
  • Motivation
  • Examples
  • Starters Kits
  • Roadmap

Using typeless

  • HMR
  • Code-Splitting

API Reference

  • createModule
  • createSelector
  • useActions
  • useMappedState
  • useSelector
  • ChainedReducer
  • Epic
  • Handle
  • Rx

API Reference (router)

  • createUseRouter
  • RouterActions
  • getRouterState
  • Link

API Reference (form)

  • createForm
  • FormActions

Code-Splitting

Reducers and epics are part of your React components. You can use React.lazy() to implement code-splitting.
Check Code-Splitting for full working example.

Example

// src/features/foo/module.tsx

import { useModule } from './interface'

export default function FooModule() {
  useModule();

  return <FooView />;
}

// components/MyComponent.tsx
const Foo = React.lazy(() => import('src/features/foo/module'));

export function MyComponent() {
  const { showFoo } = useMappedState(state => state.showFoo);

  if (showFoo) {
    return <Foo />;
  }
  return <div>Foo hidden</div>;
}
← HMRcreateModule →
typeless
Docs
Getting StartedAPI Reference
Community
Spectrum
More
GitHub
Copyright © 2020 Łukasz Sentkiewicz