Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Suggestion: use object forinput instead of tuple #99

Open
@OliverJAsh

Description

@OliverJAsh

When passing in many inputs, it's awkward to remember the indexes inside the input tuple when you're trying to read/destructure a specific input, e.g:

useObservable(input$=>{constdispatch$=input$.pipe(map(input=>input[5]),distinctUntilChanged(),);/* … */},200,[props.shouldDisableInfiniteScroll,props.isDoneFetching,props.fetchDataParams,props.fetchDataAndBuildActions,props.dispatch,props.history,],);

If the inputs were represented as an object instead, they would be much easier to destructure.

useObservable(input$=>{constdispatch$=input$.pipe(map(({ dispatch})=>dispatch),distinctUntilChanged(),);/* … */},200,pick(props,"shouldDisableInfiniteScroll","isDoneFetching","fetchDataParams","fetchDataAndBuildActions","dispatch","history",),);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp