Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

⤴️ 👝 Enables FineUploader to store its all of its state with Redux

Notifications You must be signed in to change notification settings

feltnerm/redux-fine-uploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redux-fine-uploader

🔬 Experimental! 🔬

Experimental! Build Status

Still a ton of work to do here: I'm not happy w/ the public API, all of Fine Uploader's callbacks and their parameters must be defined and handled, and much more. Treat this as a public proof of concept.

Enables Fine Uploader to store its state with Redux.

  • reducer namespaces allow sharing or hiding of data in the store.
  • wraps Fine Uploader's public callbacks so that "actions" are dispatched with callback data as the action payload.

State

Ends up looking like this:

[uploader_name]: {
    files: {
        [fineUploaderFileId]: {
            [data]
        }
    }
}

Example

Minimal example in ./example. Run with npm run example from root, or npm run build from the example directory.

Quick Setup

Reducer
const redux = require('redux')

const reduxFineUploader = require('../../..')
const { reducer } = reduxFineUploader

const makeReducer = () => reducer()
const makeStore = () => redux.createStore(redux.combineReducers({
    uploader: makeReducer()
}))

module.exports = makeStore

Todo

  • Patch all of Fine Uploader's callbacks so they use dispatch.
  • Store Fine Uploader callback parameters/data in Redux store

About

⤴️ 👝 Enables FineUploader to store its all of its state with Redux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published