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-localize
Advanced tools
A simple context wrapper and text localization component for localizing strings
A simple React Context wrapper and text localization component for localizing strings.
npm i react-localize
*or via yarn add react-localize
import { LocalizationProvider, LocalizationConsumer } from 'react-localize';
// this should come from your server or localization strings bundle source
// for your application.
const localizationBundle = {
'app.button.Submit': 'Submit',
foo: {
bar: 'Hey %s, you must be %d years old?'
}
};
<LocalizationProvider messages={localizationBundle}>
<AnyParentComponent>
<LocalizationConsumer>
{({ localize }) => {
return <div>
<h1>{localize('prop.MissingValue')}</h1>
<button>{localize('app.button.Submit')}</button>
<p>{localize('foo.bar', ['Stephen', 34])}</p>
</div>;
}}
</LocalizationConsumer>
</AnyParentComponent>
</LocalizationProvider>
// outputs:
// <div>
// <h1>prop.MissingValue</h1>
// <button>Submit</button>
// <p>Hey Stephen, you must be 34 years old?</p>
// </div>
Please refer to our gitbook documentation for more detailed information & resources.
2018-06-19 4.0.0-beta.2
<Text/>
replacement guide)_localize
internal function flow, although
the order of operations here may need to change again if there's feedback
around the current way we invoke / don't invoke props.localize
.FAQs
A simple context wrapper and text localization component for localizing strings
The npm package react-localize receives a total of 177 weekly downloads. As such, react-localize popularity was classified as not popular.
We found that react-localize 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.