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

react-flying-saucer's Issues

Remove Rollup and just use Webpack

Rollup is an additional dependency, that has its own set of problems and plugins.

I didn't use Webpack initially, because I just went with what works.

To use Webpack, we have to remove the HTML plugin, and change the inputs/outputs. This doesn't seem like that much work using the craco utils?

Update: and then the bundled code needs to be built in a format that allows the most flexible use - it seems like we would want ESM bundles to let motherships use treeshaking across the fleet

Bundling blocks hot reloading in mono-repos

Even with modules declared, It forces a workflow of:

  1. lerna bootstrap
  2. cd
  3. npm run start
  4. error
  5. fix
  6. nothing.
  7. lerna bootstrap or npm run prepare in a dependency
  8. hot reload actually happens

Template a `jsconfig.json`

We can move to the now pretty standard baseUrl: 'src' most people seem to recommend. Making absolute paths resolve from the source root, removing the need for @ as an alias.

It also gives a more obvious place to expose other aliases like for react-mothership.

Remove built-in placeholder plugin

The babel plugin enabling the _ placeholder clashes with minified code; meaning we can't just blanket add in our babel configuration and even the module forms of packages have to be bundled (bundle-react-flying-saucer).

param.macro is one more import away and provides a cleaner API.

There's something to be said for not having to import the macro - but this appears to be hard to do without another loader.

craco fails when bootstrapped with lerna

When using lerna bootstrap, examples/<project>/node_modules/react-scripts is not created and is instead in the symlinked react-flying-saucer package.

Edit: I'm assuming this is either a yarn bug or just related to symlinks, so this probably also effects pnpm et al.

rollup-plugin-alias breaking changes

The new 2.0.0 alias plugin for rollup includes vulnerability fixes as well as completely breaking compatibility with the already defined webpack aliases.

We can map aliases to the expected array form or fix the version and force resolution of vuln fixes with package-lock or resolutions.

Stop re-exporting Router primitives?

We can instead provide hooks or another functional abstraction to resolve named views and pass them to any component.

How does this interact with overriding the <Route /> component?

@babel/register functionality

Instead of --watching, we could expose a require() hook that compiles on the fly...

pros

  • no background processes

cons

  • require hacking

Bundling silently fails

When bundling pre-0.0.40, errors used to be passed along to the console.

Now, bundling succeeds, but does not emit any files or console output.

Better redux patterns

Now that hooks are in react-redux and performant, there's a lot of cases where the regular library makes more sense and it would be less confusing to import from react-redux (or rematch).

The sconnect functionality and useApp* functionality could better integrate with the raw hooks already given to us instead of abstracting them - making redux binding external.

Babel runtime helpers are always ESM

The UMD bundle does not run on some versions of node because of esm syntax in the injected babel helpers.

I believe the rollup script can search babel plugins and change the options?

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.