Skip to content

Review and improve the structure of Context files #198

@jamcry

Description

@jamcry

From @edizcelik :

By the way, we can update the file structure here. We recently started using this convention on Tinyman and it looks quite nice:

.../ToastContext.tsx     <- this includes Contexts and the ToastContextProvider
.../ToastContext.utils.ts      <-  this includes the custom hooks for the consumers
.../ToastContext.reducer.ts      <- includes the reducer and the state stuff
.../ToastContext.constants.ts    <- includes constants related to the Context
.../ToastContext.types.ts      <- includes types related to the Context (if any)

Originally posted by @edizcelik in #197 (comment)

We can do this for Toast and Toggle contexts

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