Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@quiqupltd/react-time-provider
Advanced tools
A configurable timer utility to pass time props to your components via Context API at a set interval.
TimeProvider
and TimeConsumer
A configurable timer utility to pass time props to your components via Context API at a set interval.
yarn add @quiqupltd/react-time-provider
import React, { Component } from 'react'
import TimeProvider from '@quiqupltd/react-time-provider'
class App extends Component {
render() {
return (
<TimeProvider isTimerRunning={true}>
<Routes />
</TimeProvider>
)
}
}
Then consume in your app
import { TimeConsumer } from '@quiqupltd/react-time-provider'
const RemainingTime = () => {
return (
<TimeConsumer>
{ ({now}) => <ComponentThatNeedsTimer now={now}/> }
</TimeConsumer>
)
}
TimeProvider
prop | Type | Description | Default |
---|---|---|---|
now | Number | UNIX timestamp ie. 1523444679818 | Date.now() |
isTimerRunning | Boolean | true or false starts or stops the timer | false |
timerInterval | Number | interval length in milliseconds | 1000 |
TimeConsumer
Children of TimeConsumer
will have access to TimeProvider
's props via render props
MIT © Quiqup
FAQs
A configurable timer utility to pass time props to your components via Context API at a set interval.
The npm package @quiqupltd/react-time-provider receives a total of 12 weekly downloads. As such, @quiqupltd/react-time-provider popularity was classified as not popular.
We found that @quiqupltd/react-time-provider demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 24 open source maintainers collaborating on the project.
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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.