Skip to content

Styling using Context #49

Open
Open
@Chris-Petty

Description

@Chris-Petty

Is your feature request related to a problem? Please describe.

Need easy top level way of providing styling theme to all components of react-native-data-table library.

Describe the solution you'd like

Use Context API in React, make all components subscribe to it and use it.

Describe alternatives you've considered

Passing through styles through props (give Cells/Rows etc. styles prop):

  • bad: can be annoying and messy to implement. In-line combining styleSheets will probably trigger unwanted shallow compare diffs (re-render hell, react hooks could memoize, maybe).
  • good: does give flexibility to control individual cells.

Maybe sufficient with nesting in styleSheet, though? Perhaps we should do both.

Additional context

Add any other context or screenshots about the feature request here.

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