Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Adds {After, Between}EachPass arguments to react-server #911

Merged
merged 4 commits into from
Aug 28, 2019

Conversation

cartogram
Copy link
Contributor

@cartogram cartogram commented Aug 27, 2019

Description

Added Options object as the second argument to createRender() allowing passed in values for afterEachPass and betweenEachPass #911

Type of change

  • react-server Minor: New feature (non-breaking change which adds functionality)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above
  • I have prefixed my pull request title with the corresponding emoji from this guide

Copy link
Member

@GoodForOneFare GoodForOneFare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM.

packages/react-server/src/render/test/render.test.tsx Outdated Show resolved Hide resolved
packages/react-server/src/render/test/render.test.tsx Outdated Show resolved Hide resolved
packages/react-server/src/render/render.tsx Outdated Show resolved Hide resolved
@cartogram cartogram force-pushed the react-server__after-between-each-pass branch 2 times, most recently from afeda4c to f4aac86 Compare August 27, 2019 19:27
Copy link
Member

@lemonmade lemonmade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 After comments addressed

@@ -26,12 +26,17 @@ export type RenderContext = Context & {
};
export type RenderFunction = (ctx: RenderContext) => React.ReactElement<any>;

export interface Options {
afterEachPass?(pass: Pass): any;
betweenEachPass?(pass: Pass): any;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I am doing pass-through from another set of options, I usually try to reference their types instead (Partial<Pick<ArgumentAtIndex<typeof extract, 1>, 'afterEachPass' | 'betweenEachPass'>>) should do that here, or export its Options type to get rid of the argumentAtIndex bit)

packages/react-server/src/render/test/render.test.tsx Outdated Show resolved Hide resolved
@cartogram cartogram force-pushed the react-server__after-between-each-pass branch from fefaf83 to eed2731 Compare August 28, 2019 00:34
@cartogram cartogram merged commit 872f46d into master Aug 28, 2019
@cartogram cartogram deleted the react-server__after-between-each-pass branch August 28, 2019 19:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants