
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@washingtonpost/red-react-lib
Advanced tools
This lib points to be a shared codebase for the different projects inside the WP.
This lib points to be a shared codebase for the different projects inside the WP.
For the time being we are using it as a git subtree
In order to update/commit an update, the code needs to be built before pushing.
Please just edit the src
folder contents
The components folder will be generated by the build script.
yarn install
yarn build
usePrevious Hook
Got from https://usehooks.com/usePrevious/ It saves the previous value of props or state
usePromiseCallback Hook
Hook dedicated to offer a sync way of accessing a promise state.
Keeps the last result until new results are loaded, to avoid UI flashes.
Supports a delayMS param to customise the loading threshold, to avoid UI flashes.
Only processes the last promise call.
usePromise Hook
Wrapped usePromiseCallback.
It gets triggered on init and every time the args change by default.
Useful to fetch page data.
usePrevious Hook
Got from https://usehooks.com/usePrevious/ It saves the previous value of props or state
Kind: global function
Param | Type | Description |
---|---|---|
value | * | The value to save |
Example
const [state, setState] = React.useState()
const prev = usePrevious(state)
usePromiseCallback Hook
Hook dedicated to offer a sync way of accessing a promise state.
Keeps the last result until new results are loaded, to avoid UI flashes.
Supports a delayMS param to customise the loading threshold, to avoid UI flashes.
Only processes the last promise call.
Kind: global function
Param | Type | Description |
---|---|---|
promise | Promise | The promise that would be wrapped |
deps | Array.<any> | extra deps used to re-create the callback |
delayMS | number | The delay in ms to switch the loading state to true |
Example
const [callback, result, loading, err] = usePromiseCallback(Promise.resolve, [], 500)
usePromise Hook
Wrapped usePromiseCallback.
It gets triggered on init and every time the args change by default.
Useful to fetch page data.
Kind: global function
Param | Type | Description |
---|---|---|
promise | Promise | The promise that would be wrapped |
deps | Array.<any> | deps to call the function with |
delayMS | number | The delay in ms to switch the loading state to true |
Example
const [callback, result, loading, err] = usePromise(Promise.resolve, ["hello"], 500)
FAQs
This lib points to be a shared codebase for the different projects inside the WP.
The npm package @washingtonpost/red-react-lib receives a total of 5 weekly downloads. As such, @washingtonpost/red-react-lib popularity was classified as not popular.
We found that @washingtonpost/red-react-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 248 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.