The Wayback Machine - https://web.archive.org/web/20220709170516/https://github.com/topics/reducer
Skip to content
#

reducer

Here are 576 public repositories matching this topic...

rgazelot
rgazelot commented Jan 6, 2021

Hello, I'm trying to type my application which is using redux-orm. I came across an issue with the new createSelector API. My code is as simple as:

import { createSelector } from 'redux-orm'
import orm from 'features/regulation/orm'

export const selectTest = createSelector(orm.Policy)

The error I get is that

Expected 2-9 arguments, but got 1.ts(2554)
redux.d.ts(87, 
deox
sanbornhilland
sanbornhilland commented Jun 10, 2021

Are you open to adding a Payload utility type? I think the following would be fairly useful:

const action = createActionCreator(
	'FOO',
	resolve => (foo: string) => resolve({ foo }),
)

// Get the payload type of this action
const FooPayload = Payload<typeof action>

Essentially I think you can do something like this but it would be better to make it generic.

ty
enhancement help wanted good first issue

Percona QA is a suite of scripts and utilities that assists in building, continuous integration, automated testing & bug reporting for Percona Server, Percona XtraDB Cluster, Percona XtraBackup, Percona Server for MongoDB, as well as other flavors of MySQL (Oracle, Facebook MyQSL, WebScaleSQL, MariaDB) etc.

  • Updated Jul 7, 2022
  • Shell

Improve this page

Add a description, image, and links to the reducer topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the reducer topic, visit your repo's landing page and select "manage topics."

Learn more