Skip to content
#

action-creator

Here are 23 public repositories matching this topic...

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

Improve this page

Add a description, image, and links to the action-creator 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 action-creator topic, visit your repo's landing page and select "manage topics."

Learn more