![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
github.com/jmhodges/clock
Package clock provides an abstraction for system time that enables testing of time-sensitive code.
Where you'd use time.Now
, instead use clk.Now
where clk
is an instance of
clock.Clock
.
When running your code in production, pass it a Clock
given by
clock.Default()
and when you're running it in your tests, pass it an instance
of Clock
from NewFake()
.
When you do that, you can use FakeClock
's Add
and Set
methods to control
how time behaves in your tests. That makes the tests you'll write more reliable
while also expanding the space of problems you can test.
This code intentionally does not attempt to provide an abstraction over
time.Ticker
and time.Timer
because Go does not have the runtime or API hooks
available to do so reliably. See https://github.com/golang/go/issues/8869
As with any use of time
, be sure to test Time
equality with
time.Time#Equal
, not ==
.
For API documentation, see the godoc.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.