Skip to content

WIP on MiskLink using Recompose#407

Open
adrw wants to merge 1 commit into
cashapp:masterfrom
adrw:adrw/20190712.recompose
Open

WIP on MiskLink using Recompose#407
adrw wants to merge 1 commit into
cashapp:masterfrom
adrw:adrw/20190712.recompose

Conversation

@adrw
Copy link
Copy Markdown
Contributor

@adrw adrw commented Jul 12, 2019

No description provided.

<hr css={cssMenuDivider} />
<FlexContainer css={cssMenuLinks}>
{props.categoryLinks &&
props.categoryLinks.map((link: IDashboardTab) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this can also be done with mapProps.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Iterating over the props.categoryLinks?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Not the iteration, but the function mapping the IDashboardTab to a MiskLink is a Component, so you can just wrap the MiskLink in an appropriate mapProps.

<FlexContainer css={cssMenuLinks}>
{props.categoryLinks &&
props.categoryLinks.map((link: IDashboardTab) => {
<MiskLink
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There continues to be a Typescript error where MiskLink won't accept keys: children, key, onClick, to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants