seas-computing / seas-computing/mark-one
Export MessageContext Components
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Currently, src/Alerts/MessageContext.ts exports a number of the base components needed to assemble a working message reducer in a consuming application. However, the barrel file in src/Alerts/index.ts is only exporting default, so the MessageContext itself is the only component that can be directly import into another app from mark-one. This results in us needing to do the following:
import { GlobalMessage } from 'mark-one';
import { MessageReducerAction, messageReducer } from 'mark-one/lib/Alerts/MessageContext';
As an immediate fix, we can update the index.ts to export everything from MessageContext.
As a longer term approach, we may want to define some kind of MessageWrapper that would bundle together more of the functionality into a single component that we can import along with a useDispatchMessage hook.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/Alerts/index.ts and compare its exports with the components and types exposed by src/Alerts/MessageContext.ts. Update the barrel export so consumers can import the MessageContext components from mark-one rather than the internal path. Done means the named exports are available through the package entry point; the longer-term MessageWrapper and useDispatchMessage ideas are separate scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100