-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enable date range state to be controlled #1198
base: canary
Are you sure you want to change the base?
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/securex/atomic-react/dLNZNxFcYb3QHNfUVJFNAJv6K6vq |
Codecov Report
@@ Coverage Diff @@
## master #1198 +/- ##
==========================================
- Coverage 91.20% 90.50% -0.71%
==========================================
Files 104 98 -6
Lines 3162 3054 -108
Branches 1054 1046 -8
==========================================
- Hits 2884 2764 -120
- Misses 240 249 +9
- Partials 38 41 +3
Continue to review full report at Codecov.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it's good to go. I couldn't find any major issues and it should be a nice improvement
return startDate instanceof Date && isSameDate(date, startDate) || | ||
endDate instanceof Date && isSameDate(date, endDate) || | ||
false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice simplification here
cdd463e
to
516db8f
Compare
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
Allows a developer to control the state within
useADateRange
.What is the current behavior?
The state setter is not returned from
useADateRange
:What is the new behavior (if this is a feature change)?
Exposes the setter from
useADateRange
to allow a consumer to control it's state directly:Does this PR introduce a breaking change?
No
Other information:
useADateRange
and have created Rethink useADateRange hook #1197 as a result