Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
react-use-presentation
Advanced tools
Create pure HTML (React enriched if you will) presentations.
Preview with background video here!
Plain | Video BG |
---|---|
npm install --save react-use-presentation
export const myFramesArray = [
{
component: <div>First Frame with 1 second duration</div>,
time: 1000
},
{
component: <div>Second Frame with 2 second duration</div>,
time: 2000
},
{
component: <div>Last Frame without duration</div>,
}
]
import * as react from 'react';
import usePresentation from 'react-use-presentation';
import { myFramesArray1 } from './myFramesArray'
export default function App() {
const [Presentation] = usePresentation({ framesOptions: myFramesArray1 });
return (
<Presentation />
)
}
import * as react from 'react';
import usePresentation from 'react-use-presentation';
import { myFramesArray2 } from './myFramesArray'
export default function App() {
const [DelayedPresentation] = usePresentation({
framesOptions: myFramesArray2,
startDelay: 1000
});
return (
<DelayedPresentation />
)
}
import * as react from 'react';
import usePresentation from 'react-use-presentation';
import { myFramesArray3 } from './myFramesArray'
export default function App() {
const [DelayedAndLoopedPresentation] = usePresentation({
framesOptions: myFramesArray3,
startDelay: 1000,
isLoop: true
});
return (
<DelayedAndLoopedPresentation />
)
}
import * as react from 'react';
import usePresentation from 'react-use-presentation';
export default function App() {
const [Presentation] = usePresentation({ framesOptions: myFramesArray1 });
const [DelayedPresentation] = usePresentation({ framesOptions: myFramesArray2, startDelay: 1000 });
const [DelayedAndLoopedPresentation, currentLoopFrame, loopFramesLength] = usePresentation({ framesOptions: myFramesArray3, startDelay: 1000, isLoop: true });
return (
<>
<Presentation />
<DelayedPresentation />
<div>
<p>Current frame: {currentLoopFrame}/{loopFramesLength}</p>
<DelayedAndLoopedPresentation />
</div>
</>
)
}
usePresentation()
constructor:
type TFrameOptions = {
component: Component | null,
time?: number
}
type TUsePresentation = {
framesOptions: Array<TFrameOptions>,
startDelay?: number,
isLoop?: boolean
}
usePresentation(TUsePresentation);
usePresentation()
returns:
An array with 3 positions, described below:
As the return is an array you may name each array position in an arbitrary way, e.g.:
const [MyLittleComponent, currentFrameLittle, totalLengthLittle] = usePresentation();
react-use-presentation is MIT licensed.
This hook is created using create-react-hook.
FAQs
Create pure HTML (React enriched if you will) presentations.
The npm package react-use-presentation receives a total of 2 weekly downloads. As such, react-use-presentation popularity was classified as not popular.
We found that react-use-presentation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.