Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-i18next

Package Overview
Dependencies
Maintainers
1
Versions
316
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-i18next - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

2

package.json
{
"name": "react-i18next",
"version": "0.0.0",
"version": "0.0.1",
"description": "i18next plugin for jquery usage",

@@ -5,0 +5,0 @@ "main": "./bin/index.js",

@@ -57,3 +57,3 @@ # react-i18next

function TranslatableView(props) {
const { t } from props;
const { t } = props;

@@ -64,3 +64,3 @@ return (

<p>{t('anotherNamespace:key.from.another.namespace', { /* options t options */ })}</p>
<div>
</div>
)

@@ -67,0 +67,0 @@ }

@@ -15,6 +15,4 @@ import React, { Component, PropTypes } from 'react';

i18n = context.i18n;
}
getInitialState () {
return {
this.state = {
i18nLoadedAt: null

@@ -25,2 +23,4 @@ };

componentWillMount() {
this.mounted = true;
i18n.loadNamespaces(namespaces);
t = i18n.getFixedT(null, namespaces);

@@ -31,3 +31,3 @@ }

this.onI18nChanged = () => {
if (!this.isMounted()) return;
if (!this.mounted) return;

@@ -41,2 +41,3 @@ this.setState({ i18nLoadedAt: new Date() });

componentWillUnmount() {
this.mounted = false;
if (this.onI18nChanged) {

@@ -49,3 +50,3 @@ i18n.off('languageChanged', this.onI18nChanged);

onI18nChange() {
if (!this.isMounted()) return;
if (!this.mounted) return;

@@ -52,0 +53,0 @@ this.setState({ i18nLoadedAt: new Date() });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc