Skip to content

Commit b21869d

Browse files
committed
Inital commit
0 parents  commit b21869d

22 files changed

Lines changed: 3576 additions & 0 deletions

.agents/plugins/marketplace.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "react-timer-hook",
3+
"interface": {
4+
"displayName": "React Timer Hook"
5+
},
6+
"plugins": [
7+
{
8+
"name": "caveman",
9+
"source": {
10+
"source": "local",
11+
"path": "./plugins/caveman"
12+
},
13+
"policy": {
14+
"installation": "AVAILABLE",
15+
"authentication": "ON_INSTALL"
16+
},
17+
"category": "Productivity"
18+
}
19+
]
20+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: API design discussion
3+
about: Discuss lifecycle semantics before proposing implementation
4+
title: ''
5+
labels: api-design
6+
assignees: ''
7+
---
8+
9+
# API Design Discussion
10+
11+
## Use Case
12+
13+
Describe the use case.
14+
15+
## Current Workaround
16+
17+
How would you solve this today?
18+
19+
## Proposed API
20+
21+
```tsx
22+
// proposed usage
23+
```
24+
25+
## Lifecycle Semantics
26+
27+
How should this interact with:
28+
29+
- `start`
30+
- `pause`
31+
- `resume`
32+
- `reset`
33+
- `restart`
34+
- `cancel`
35+
- `onEnd`
36+
- schedules
37+
- `useTimerGroup`
38+
39+
## Async Behavior
40+
41+
Does this involve async callbacks?
42+
43+
- [ ] no
44+
- [ ] yes, with overlap allowed
45+
- [ ] yes, with overlap skipped
46+
- [ ] yes, unsure
47+
48+
## Non-Goals
49+
50+
What should the library not do?
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: Bug report
3+
about: Report incorrect timer behavior, cleanup issues, or callback problems
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
# Bug Report
10+
11+
## Description
12+
13+
Describe the bug.
14+
15+
## Expected Behavior
16+
17+
What did you expect to happen?
18+
19+
## Actual Behavior
20+
21+
What happened instead?
22+
23+
## Minimal Reproduction
24+
25+
Link a reproduction or paste the smallest possible code sample.
26+
27+
## Environment
28+
29+
- `react-timer-hook` version:
30+
- React version:
31+
- React Strict Mode enabled: yes/no
32+
- Browser or runtime:
33+
- Test runner if relevant:
34+
- Fake timers if relevant: yes/no
35+
36+
## Timer Usage
37+
38+
- [ ] `useTimer`
39+
- [ ] `useTimerGroup`
40+
- [ ] schedules
41+
- [ ] debug logging
42+
- [ ] async `onEnd`
43+
- [ ] async schedule callback
44+
45+
## Debug Logs
46+
47+
If possible, enable debug logging and paste the relevant semantic events.
48+
49+
Do not paste secrets, access tokens, or private API responses.
50+
51+
## Additional Context
52+
53+
Anything else that helps explain the issue.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Feature request
3+
about: Propose a new capability or public API addition
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
# Feature Request
10+
11+
## Problem
12+
13+
What problem are you trying to solve?
14+
15+
## Proposed API
16+
17+
Show the API you would like to use.
18+
19+
```tsx
20+
// example
21+
```
22+
23+
## Why App Code Cannot Solve This
24+
25+
Explain why this cannot be built from `now`, `elapsedMilliseconds`, controls, schedules, or `useTimerGroup`.
26+
27+
## Boundaries
28+
29+
Does this request add any of the following?
30+
31+
- [ ] formatting
32+
- [ ] timezone conversion
33+
- [ ] localization
34+
- [ ] data fetching lifecycle
35+
- [ ] retries/backoff/cache
36+
- [ ] audio/sound behavior
37+
- [ ] business-specific state
38+
39+
If yes, explain why it belongs in this library.
40+
41+
## Alternatives Considered
42+
43+
What alternatives did you consider?
44+
45+
## Additional Context
46+
47+
Anything else that helps explain the request.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Summary
2+
3+
Describe the change and why it is needed.
4+
5+
## Type of Change
6+
7+
- [ ] Bug fix
8+
- [ ] Feature
9+
- [ ] Documentation
10+
- [ ] Test-only change
11+
- [ ] Build/release automation
12+
- [ ] Refactor with no behavior change
13+
14+
## Checklist
15+
16+
- [ ] Tests added or updated
17+
- [ ] Docs added or updated for public behavior
18+
- [ ] No formatting/timezone/localization behavior added to core
19+
- [ ] No raw timeout handles exposed
20+
- [ ] Debug logs are opt-in if touched
21+
- [ ] `useTimerGroup` still uses one scheduler if touched
22+
- [ ] Changeset added when release automation requires it
23+
24+
## Validation
25+
26+
Paste the commands run:
27+
28+
```sh
29+
pnpm test
30+
pnpm typecheck
31+
pnpm build
32+
```
33+
34+
## Notes
35+
36+
Add any follow-up work, known tradeoffs, or compatibility notes.

0 commit comments

Comments
 (0)