Skip to content

Solution Feedback: fractal-component #45

@t83714

Description

@t83714

Has submitted my solution via #44

Created this issue to make it easier for anyone who wants to check it out.

The problem of building a scalable frontend application using Redux or Elm has been well described by @slorber here

fractal-component perfectly solved this problem by providing a fully decoupled component encapsulation mechanism --- a component created using fractal-component can be even published as NPM modules while still enjoy the convenience of predictable global Redux store.

You can actually have a look at the NPM module version of this example on CodePen --- see how whole example App's logic is implemented in a single HTML file by pulling UMD version of NPM modules from CDN :-)

How fractal-component achieves that? It powers your components with the following features:

  • Multicast Actions
  • Namespaced Actions
  • Serializable Symbol Action Type
  • Hot Plug Redux Reducer & Auto mount / unmount
  • Hot Plug Saga & Auto mount / unmount
  • Namespaced Redux Store
  • Auto Component State Management & Redux Store Mapping
  • Enhanced Server Side Rendering (SSR) Support

A typical structure of components created by fractal-component can be illustrated by the graph below:

Typical Container Container Component Structure Diagram

Run example App locally

npm install
npm start

Then, visit http://localhost:3000/

Giphy.com API key

The exampleApp comes with a testing Giphy.com API key in order to retrieve random Gifs from https://giphy.com/. The api key is limted to 40 requests per hour.

You can create your own API key from https://developers.giphy.com/ and replace the API key in Component RandomGif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions