Skip to content

使用 context 传递 props? #1

Open
@dive2Pro

Description

@dive2Pro

time-gantt 中是这么使用的:

import { DraggingDecorator, DragComponent } from 'rc-chart-slider';
            data={{
              showPercent,
              showStartPercent,
            }}
            width={CHART_WIDTH}
            clickJumpPercent={CLICK_JUMP_PERCENT}
            callback={this.callBack}
            _dragActions={this.props._dragActions}
          />

props _dragActionsdata 这两个内部 属性, 可以通过 context 来进行传递, 免除一些操作.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions