Skip to content

Discussion: Roadmap to 1.0 #82

Closed
Closed
@markerikson

Description

@markerikson

I'd been thinking about putting up a discussion issue like this already, and someone asked about it today, so figure I might as well.

I deliberately started out at 0.1.0 to give us room to fiddle with the API before reaching stability. The "convert to TS" release put us at 0.4.0. So, what do we feel would be needed to reach a stable 1.0 status?

Here's my rough thoughts on further changes I'm considering:

  • Selectors
    • I'm considering dropping Selectorator, re-exporting createSelector from Reselect, adding a dependency on Re-reselect, and re-exporting its createCachedSelector
    • We might want to have a tiny wrapper around those that only accepts the array form of input selectors, not the arbitrary function arguments form Looking like Reselect v5 may do this as a breaking change
  • createSlice
    • I want to add the ability to handle other action types besides the ones generated for the provided reducers. Working on that now.
    • Would like to consider the "customize payload callback" idea
    • Change names of generated selectors (selectFoo instead of getFoo)?
    • Returning a default selector that's just state => state is pointless. Why are we doing that? What should we do instead?
  • createAction
    • add .type to the action creators in addition to .toString(). This helps with JS switch statements, as well as object lookup tables in TS.
  • Async requests
    • I'm open to some options for simplifying async request handling. Possibilities:
      • Generating "STARTED/SUCCESS/FAILURE" action types
      • Generating thunks that call a provided API function and dispatch those action types based on promise lifecycle
      • Pulling in redux-promise
  • More safety checks
    • I'd like to see if I can make a middleware that checks for side effects that happen in a reducer (at least async requests and uses of randomness) Skipping this idea
  • Other
    • Might as well add reduce-reducers to the toolkit
    • Should fix tree shaking
    • Allow devTools to be more options beyond a boolean
    • Review autodux to see if there's any other functionality we want to swipe
    • Consider adding a simple middleware that lets users define callbacks to run in response to specific actions (which thunks can't do)

Not saying we have to have all of these, but those are the ideas floating around my head.

Thoughts? Suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions