Giter VIP home page Giter VIP logo

redux-filter's Introduction

Redux Filter

Build Status Coverage Status

Higher Order React Component for filtering (and sorting) a collection of items. This is especially useful in product filters that mimic the sorting/filtering behavior of Amazon or Best Buy. See the Sweater Example.

Usage - With Existing Redux Store

Store and Reducer Setup

    import {createStore, combineReducers} from 'redux';

    import { reducer as filterReducer, filterActions } from 'redux-filter';

    // 1. Pick a mount point where your filter state will live.
    const reducers = {
        // ... your other reducers here
        filters: filterReducer
    };

    const reducer = combineReducers(reducers);

    // 2. create your store, passing in some initial state at the same mount point
    const store = createStore(
        reducer,
        filters: {

          // things that are filtered
          subjects: window.SUBJECTS,

          // attributes that you filter.
          // Component will return a unique list of attributes for each filterableCriteria
          filterableCriteria: [
              {
                  title: 'Filter By Practice Area',
                  attribute: 'practices'
              },
              {
                  title: 'Filter Alphabetically',
                  attribute: 'initial'
              }
          ],

          // keys on each subject that will be searched on
          searchKeys: ['title', 'subhead', 'practices'],

          // if you need to order the filterableCriteria output
          filterableCriteriaSortOptions: {
              tags: items => [...items].sort()
          }
        }
    );

    // 3. *IMPORTANT* Dispatch the init action
    store.dispatch(filterActions.init());

Selector

Build a selector for accessing your filter state. Pass in a function that resolves your filter state form the full state tree

    import { buildSelector } from 'redux-filter';
    const selector = buildSelector(state => state.filters);

    // use when getting filter state
    const filterState = selector(store.getState());

See results for what is returned form the filter selector

Usage - Component

Wrap filter App in <Filter>, passing in config options as props to <Filter>. The component will handle the filter state of your application and expose actions to change filters and keyword searches.

import React from 'react';
import Filter from 'redux-filter';
import App from './components/App';

const config = {

  // things that are filtered
  subjects: window.SUBJECTS,

  // attributes that you filter.
  // Component will return a unique list of attributes for each filterableCriteria
  filterableCriteria: [
      {
          title: 'Filter By Practice Area',
          attribute: 'practices'
      },
      {
          title: 'Filter Alphabetically',
          attribute: 'initial'
      }
  ],

  // keys on each subject that will be searched on
  searchKeys: ['title', 'subhead', 'practices'],

  // if you need to order the filterableCriteria output
  filterableCriteriaSortOptions: {
      tags: items => [...items].sort()
  }
};

// render as usual, passing in config to <Filter>
React.render(<Filter {...config}>
        <App />
    </Filter>,
    document.getElementById('team-filter-root')
);

<Filters /> will inject the following props into the child component:

Results

  • collection {Array.<Object>}. The sorted/filtered list of subjects after filters have been applied.

  • keyword {string}. The currently applied search keyword

  • optionGroups {Array.<Object>}. Unique values of the attributes from subjects taken from the filterableCriteria option. It also counts the number of subjects that meet the attribute.

  • currentPage {Number}. Current page after calling goToPage. NOTE: if a filter is applied currentPage will be set to 1.

Example:

{
    title: "Sweater Type",
    values: [
        {
            value: "Cashmere",
            count: 69,
            attribute: "type"
        },
        {
            value: "V-Neck",
            count: 57,
            attribute: "type"
        },
        {
            value: "Cardigans",
            count: 59,
            attribute: "type"
        },
        {
            value: "Crew and Scoop",
            count: 54,
            attribute: "type"
        },
        {
            value: "Cowl & Turtleneck",
            count: 61,
            attribute: "type"
        }
    ]
}

Actions

  • init {function(void):void}. Initialize the filter state. MUST be called after store creation if using with an existing redux store.

  • clearFilters {function(filterAttribute{string}):void}. Clear all filters of a given type.

  • keywordSearch {function(string):void}. Search the collection by keyword.

  • toggleFilter {function(filterAttribute, filterValue):void} Toggle a filter by attribute and value. If a filter of that attribute is not applied it will be added. If a filter of that attribute was applied it will be removed.

  • toggleOnly {function(filterAttribute, filterValue):void} Remove all other filters of this attribute, except the one applied. Useful in select box or radio button scenarios.

  • goToPage {function(pageNum):void}. Set the currentPage to pageNum

<Filter /> props or InitialState passed to a redux store

subjects {Array<Object>}

Default: []

Things that will be filtered. After running through the filtering/sorting logic, subjects becomes collection.

filterableCriteria {Array<Object>}

Default: []

Attributes on subjects that you want to filter. Each object in this array will build up a unique list of properties based on subjects and inject as optionGroups into your component. See the example under optionGroups for example of output

Each criteria can he marked as hierarchical which will trigger hierarchical optionGroups. See examples/hiearchy-filter

filterableCriteriaSortOptions {Object.<string, function>}

Default: {}

Object of callback functions used to order optionGroups

To order the sweater type, for example:

filterableCriteriaSortOptions: {
    type: (items) => [...items].sort()
}

sortItems {Array.<Object>}

Default: []

Sort functions to be applied to subjects after filtered. Usually this is 'Sort by Price - Lowest to Highest' or similar. The first object will be applied as the initial sort function.

searchThreshold {number} 0 - 1

Default: .2

If using keyword search: At what point does the search keyword search algorithm give up. A threshold of 0.0 requires a perfect match (of both letters and location), a threshold of 1.0 would match anything.

searchKeys {Array.<string>}

Default: []

Attributes on each subject that are searched with the keyword search.

middleware {Array.<function>}

Default: []

Functions that will serve as arbitrary Redux Middleware.

initialState {Object}

Default: {}

Start the filter with some initial state. Usually this will be restoring state that was serialized and stored from middleware. See the examples folder for a demonstration on restoring state from a url hash.

Todo

  • Paging

redux-filter's People

Contributors

nsmith7989 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

redux-filter's Issues

Examples dont start

There seem to be several problems with the examples:

Warning: you are using an outdated format of React Transform configuration. Please update your configuration to the new format. See the Releases page for migraorm/releases

and

236-hot-middleware/process-update.js 2.94 kB {0} [built]
237-hot-middleware/client.js?reload=true 3.24 kB {0} [built]
ERROR in ./~/redbox-react/lib/index.js
Module build failed: ReferenceError: Unknown plugin "rewire"
at PluginManager.subnormaliseString (C:\dev\projects\redux-filter\examples\product-filtering\node_modules\babel-core\lib\transformation\file\plugin-manager
at PluginManager.add (C:\dev\projects\redux-filter\examples\product-filtering\node_modules\babel-core\lib\transformation\file\plugin-manager.js:190:40)
at File.buildTransformers (C:\dev\projects\redux-filter\examples\product-filtering\node_modules\babel-core\lib\transformation\file\index.js:237:21)
at new File (C:\dev\projects\redux-filter\examples\product-filtering\node_modules\babel-core\lib\transformation\file\index.js:139:10)
at Pipeline.transform (C:\dev\projects\redux-filter\examples\product-filtering\node_modules\babel-core\lib\transformation\pipeline.js:164:16)
at transpile (C:\dev\projects\redux-filter\examples\product-filtering\node_modules\babel-loader\index.js:12:22)
at Object.module.exports (C:\dev\projects\redux-filter\examples\product-filtering\node_modules\babel-loader\index.js:71:12)
@ ./index.js 13:19-42

Product Filter Examples not working

ERROR in (webpack)/buildin/module.js
Module build failed: ReferenceError: [BABEL] /home/jie/Documents/redux-filter/examples/product-filtering/node_modules/webpack/buildin/module.js: Unknown option: /home/jie/Documents/redux-filter/.babelrc.presets

T-shirt example broken since v2.0.0

I wanted to take a first look at redux-filter but the t-shirt demo seems to have a problem.

I then tried the Latest and v2.1.0 and discovered that it the page stays empty, and the console contains this error:

APPLY_SORT
dispatching Objectfunc: Objecttype: "APPLY_SORT"__proto__: Object
Uncaught TypeError: Cannot read property 'appliedFilters' of undefined
[HMR] connected

But when i checkout the older v2.0.0 example it all works as it should.

Add option to clear all applied filters at once.

Currently there is a way to clear individual filters by attribute. But it's awkward to clear all filters at once.

Consider:

class AppliedFilters extends Component {


    buildAppliedFilters(attribute, filter) {
        const { toggleFilter } = this.props;
        return <span className="applied-filter" onClick={() => toggleFilter(attribute, filter)}>
            <span className="remove">x</span>{filter}
        </span>
    }

    clearAllFilters(filters) {
        const { clearFilters } = this.props;
        filters.map(clearFilters);
    }

    render() {
        const { appliedFilters, toggleFilters, clearFilters } = this.props;

        const filtersKey = [];
        const filters = Object.keys(appliedFilters).map((key, idx) => {
            filtersKey.push(key);
            return appliedFilters[key].map(filter => this.buildAppliedFilters(key, filter));
        });


        return  <div className="selected-filters">
            {filters}

            {filters.length > 0 && <span onClick={() => this.clearAllFilters(filtersKey)}>Clear All Filters</span>}

        </div>
    }

}

It would be better to expose a method to clear all applied filters regardless of attribute.

Examples have the issue "react-transform-catch-errors does not look like a React component"

First of all thanks for the filters for redux , i love them . But when i try to install the examples in my system it didnt work . it was giving the error "react-transform-catch-errors does not look like a React component" when i ran "npm start".
Anyway i found out the solution for the issue.It is with the "redbox-react": "^1.0.6" " . Just remove "^" for the dependency such that it downloads the exact version of redbox-react. I guess the newer version of the library has the bug.

Can't start examples

Ubuntu 16.04, node 6.3.1, npm 3.10.3

terminal dump is below, but getting repeated instances of this error after clone, npm install, npm start in the example folders:

Module build failed: ReferenceError: [BABEL] /home/bmp/code/redux-filter/examples/product-filtering/node_modules/webpack-hot-middleware/client-overlay.js: Unknown option: /home/bmp/code/redux-filter/.babelrc.presets

Not familiar with a lot of the packages in this project (eg browsersync) so wasn't able to troubleshoot myself.

happy to provide more info or try solutions if you have ideas.

Thanks!

$ npm start
> [email protected] start /home/bmp/code/redux-filter/examples/product-filtering
> node devServer.js

[BS] Access URLs:
 --------------------------------------
       Local: http://localhost:3002
    External: http://192.168.8.101:3002
 --------------------------------------
          UI: http://localhost:3003
 UI External: http://192.168.8.101:3003
 --------------------------------------
[BS] Serving files from: ./
[BS] Watching files...
webpack built 596c858508cc976530af in 387ms
Hash: 596c858508cc976530af
Version: webpack 1.13.1
Time: 387ms
    Asset     Size  Chunks       Chunk Names
bundle.js  35.7 kB       0       filter
chunk    {0} bundle.js (filter) 4.53 kB [rendered]
    [0] multi filter 40 bytes {0} [built] [1 error]
    [1] (webpack)-hot-middleware/client.js?reload=true 4.49 kB {0} [built] [5 errors]

ERROR in ./index.js
Module build failed: ReferenceError: [BABEL] /home/bmp/code/redux-filter/examples/product-filtering/index.js: Unknown option: /home/bmp/code/redux-filter/.babelrc.presets
    at Logger.error (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/logger.js:58:11)
    at OptionManager.mergeOptions (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:29)
    at OptionManager.addConfig (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
    at OptionManager.findConfigs (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
    at OptionManager.init (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
    at File.initOptions (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/index.js:147:75)
    at new File (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/index.js:137:22)
    at Pipeline.transform (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
    at transpile (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-loader/index.js:12:22)
    at Object.module.exports (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-loader/index.js:71:12)
 @ multi filter

ERROR in (webpack)-hot-middleware/client-overlay.js
Module build failed: ReferenceError: [BABEL] /home/bmp/code/redux-filter/examples/product-filtering/node_modules/webpack-hot-middleware/client-overlay.js: Unknown option: /home/bmp/code/redux-filter/.babelrc.presets
    at Logger.error (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/logger.js:58:11)
    at OptionManager.mergeOptions (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:29)
    at OptionManager.addConfig (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
    at OptionManager.findConfigs (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
    at OptionManager.init (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
    at File.initOptions (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/index.js:147:75)
    at new File (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/index.js:137:22)
    at Pipeline.transform (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
    at transpile (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-loader/index.js:12:22)
    at Object.module.exports (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-loader/index.js:71:12)
 @ (webpack)-hot-middleware/client.js?reload=true 99:14-41

ERROR in (webpack)-hot-middleware/process-update.js
Module build failed: ReferenceError: [BABEL] /home/bmp/code/redux-filter/examples/product-filtering/node_modules/webpack-hot-middleware/process-update.js: Unknown option: /home/bmp/code/redux-filter/.babelrc.presets
    at Logger.error (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/logger.js:58:11)
    at OptionManager.mergeOptions (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:29)
    at OptionManager.addConfig (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
    at OptionManager.findConfigs (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
    at OptionManager.init (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
    at File.initOptions (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/index.js:147:75)
    at new File (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/index.js:137:22)
    at Pipeline.transform (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
    at transpile (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-loader/index.js:12:22)
    at Object.module.exports (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-loader/index.js:71:12)
 @ (webpack)-hot-middleware/client.js?reload=true 121:20-47

ERROR in ./~/querystring/index.js
Module build failed: ReferenceError: [BABEL] /home/bmp/code/redux-filter/examples/product-filtering/node_modules/querystring/index.js: Unknown option: /home/bmp/code/redux-filter/.babelrc.presets
    at Logger.error (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/logger.js:58:11)
    at OptionManager.mergeOptions (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:29)
    at OptionManager.addConfig (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
    at OptionManager.findConfigs (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
    at OptionManager.init (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
    at File.initOptions (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/index.js:147:75)
    at new File (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/index.js:137:22)
    at Pipeline.transform (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
    at transpile (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-loader/index.js:12:22)
    at Object.module.exports (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-loader/index.js:71:12)
 @ (webpack)-hot-middleware/client.js?reload=true 13:20-42

ERROR in ./~/strip-ansi/index.js
Module build failed: ReferenceError: [BABEL] /home/bmp/code/redux-filter/examples/product-filtering/node_modules/strip-ansi/index.js: Unknown option: /home/bmp/code/redux-filter/.babelrc.presets
    at Logger.error (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/logger.js:58:11)
    at OptionManager.mergeOptions (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:29)
    at OptionManager.addConfig (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
    at OptionManager.findConfigs (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
    at OptionManager.init (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
    at File.initOptions (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/index.js:147:75)
    at new File (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/index.js:137:22)
    at Pipeline.transform (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
    at transpile (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-loader/index.js:12:22)
    at Object.module.exports (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-loader/index.js:71:12)
 @ (webpack)-hot-middleware/client.js?reload=true 95:14-35

ERROR in (webpack)/buildin/module.js
Module build failed: ReferenceError: [BABEL] /home/bmp/code/redux-filter/examples/product-filtering/node_modules/webpack/buildin/module.js: Unknown option: /home/bmp/code/redux-filter/.babelrc.presets
    at Logger.error (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/logger.js:58:11)
    at OptionManager.mergeOptions (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:29)
    at OptionManager.addConfig (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
    at OptionManager.findConfigs (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
    at OptionManager.init (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
    at File.initOptions (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/index.js:147:75)
    at new File (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/file/index.js:137:22)
    at Pipeline.transform (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
    at transpile (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-loader/index.js:12:22)
    at Object.module.exports (/home/bmp/code/redux-filter/examples/product-filtering/node_modules/babel-loader/index.js:71:12)
 @ (webpack)-hot-middleware/client.js?reload=true 1:0-41

T-shirt example uses BrowserSync

I'd like to suggest to remove BrowserSync from the examples.

As a new user looking for a quick example, i do not see the value it adds here.
But i do experience a lot of overhead;

  • on Windows it requires Visual Studio and Python installed.
  • on Linux it starts arguing with the browsersync instance i already run.
  • on Linux it slows everything down, i dont like staring at npm install and npm start forever. (i did a lot of those to pinpoint #25)

Allow filters to be hierarchical

Each subject will contain hierarchical filter criteria. E.g.,

[
    {
        "title": "Creamy Potato Salad",
        "filterableAttributes": [
            {
                "title": "Categories",
                "children": [
                    {
                        "title": "Classic Chilled Salads",
                        "children": [
                            {
                                "title": "Potato Salad",
                                "children": [
                                    {
                                        "title": "Russet Potato"
                                    }
                                ]
                            }
                        ]
                    }
                ]
            },
            {
                "title": "Dietary Concerns",
                "children": [
                    {
                        "title": "Gluten Free",
                        "children": [
                            {
                                "title": "Starch Only",
                            }
                        ]
                    }
                ]
            }
        ]
    }
]

buildOptions will build out optionGroups that respect this hierarchy.

[
    {
        "title": "Categories",
        "count": 1,
        "children": [
            {
                "title": "Classic Chilled Salads",
                "count": 1
                "children": [
                    {
                        "title": "Potato Salad",
                        "count": 1,
                        "children": [
                            {
                                "title": "Russet Potato",
                            }
                        ]
                    }
                ]
            }
        ]
    }
]

Integration Example Broken

This looks like a very promising component. However, I am having trouble integrating with an existing redux app that I am building.

From a fresh install of the integration example, I am getting the following error in my browser console:

Uncaught TypeError: (0 , _reduxFilter.buildInitialState) is not a function

It seems that there is some restructuring that is being done with how the buildInitialState gets invoked with regards to the subjects being passed into it. Any pointers would be very helpful.

Won't update on new data

When initially rendering with 10 subjects all works fine, but if you add more subjects they do not appear in the collection inside the wrapped component.

Expose the currently applied sort index

Currently there is no way to know which sort function is applied within the app. Not knowing means that components end up more stateful than they need to be.

Expose serializable state

Expose a subset of filter state that is serializable (e.g. could hash a url). State of filters/sorts should be rebuildable from this state.

Integration with a Redux store

Hi, I read through the doc and examples but I don't understand how this should be integrated in an app that uses Redux to store the app state.
I can see that this could have its own store but normally Redux encourage to have 1 unique store in the app.
Any thoughts on this?

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.