Giter Site home page Giter Site logo

d3dc / react-flying-saucer Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 7.29 MB

A simple framework built on top of create-react-app for scalable single-page apps with functional react.

JavaScript 97.31% CSS 2.69%
create-react-app esnext redux rematch effects selectors memoize spa react feature-fleet modules hooks mothership app star-app star-child wip react-hooks

react-flying-saucer's Introduction

react-flying-saucer ๐Ÿ›ธ

The ๐Ÿ‘พ aren't in the bikeshed.

ย 

ย 

A simple framework built on top of create-react-app for scalable single-page apps with functional react.

Tries to get out of the way by using only next generation JavaScript features and React spacedust.

features:

  • ๐Ÿ”— Compose feature modules as declarative React components

  • ๐Ÿ”ฉ Build functional pipelines with opinionated syntax from babel-preset-techno-babel.

  • ๐Ÿ“ฌ Models provide a bite-size abstraction for redux and keep rendering fast with first-class selectors

  • ๐Ÿงฑ Write business logic and data sources as plain modules and let dependency injection handle the rest

  • ๐Ÿ”‹ Batteries included!

    suspense scoped route trees dynamic models
    error boundaries enhanced routing components shorthand redux bindings
    contextual constants composable view side-effects automatic react import

ย 

ย 


Quick Start

  • $npx create-react-flying-saucer app
  • $cd app
  • $yarn start

ย 

ย 

Whats in the Box?

react-flying-saucer proposes two declarative react primitives to build your app with. It abstracts outside effects (navigation) and redux state to an "app" container provided by a Mothership. Using React semantics, the mothership declaratively lists the Features that modify and listen to this context - preserving redux state scoping and feature component lazy loading.

<Mothership>
    <FormsProvider>
        <Dashboard path="/dash">
            <GlobalStats />
            <TimerBar />
        </Dashboard>
        <Account
            path="/"
            loggedInView="Dashboard"
        />
    </FormsProvider>
</Mothership>

ย 

One-touch bootstrap or migrate

  • run the latest create-react-app and add react-flying-saucer
$ npx create-react-flying-saucer <project>
  • add react-flying-saucer to an existing app bootstrapped with create-react-app
$ cd <project>
$ npx migrate-react-flying-saucer

import aliases

One flying saucer, Two flying saucers

@

A link to the source root of your project.

@@

re-exports everything you need for creating and mounting a feature fleet.

import { $$ } from '@@'
import Sidebar from '@/features/sidebar'

dot files

react-flying-saucer respects any .babelrc and .eslintrc configuration files. Any additional configuration your project needs can be added directly to these files.

ย 

ย 


Examples

More Reading

Packages

Typescript when?!

As soon as @rematch/rematch fixes its core typings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.