alhub-react's People
Forkers
sdeseille mgorabbani baaraak d3mola blackshady duythien0912 kevinpr007 shoeblabs haripcce tanureja madkraft giyeonkwon haneetsingh acnurmagd blaurt shalin21 maltager hirav2607 kirankumarambati dalalsunil1986 pankajwankhede angelomedeiros cmudshoaib hilltool vinothselvarajualhub-react's Issues
On Sign Up Validation throws an error
TypeError: Cannot read property 'email' of undefined
SignupForm.render
src/components/forms/SignupForm.js:60
57 | name="email"
58 | value={data.email}
59 | onChange={this.onChange}
60 | className={
61 | errors.email ? "form-control is-invalid" : "form-control"
62 | }
63 | />
Missing locale data for locale: “undefined”. Using default locale: “en” as fallback
I develop a react app which shows the error
[React Intl] Missing locale data for locale: "undefined". Using default locale: "en" as fallback.
[React Intl] Missing message: "nav.dashboard" for locale: "en" [React Intl] Cannot format message: "nav.dashboard", using message id as fallback
my app.js
import{ IntlProvider,addLocaleData } from "react-intl";
import messages from "./messages";
import{locale} from "./reducers/locale";
import {setLocale} from "./actions/locale";
class App extends React.Component {
render() {
const { location, isAuthenticated, loaded, lang } = this.props;
console.log(lang); //undefined in console
return (
<IntlProvider key={ lang } locale={lang} messages={messages}>
</IntlProvider>
);
}
My displayPage.js
import { FormattedMessage } from "react-intl";
import messages from "../../messages";
FormattedMessage id="nav.dashboard"
default message="dash"/>
My locale.js/actions
import{ LOCALE_SET } from "../types";
export const localeSet = lang =>({
type: LOCALE_SET,
lang
});
export const setLocale = lang => dispatch =>{
localStorage.myLang = lang;
};
my locale.js/reducer
import { LOCALE_SET } from "../types";
default function locale(state={lang:"en"}, action={}){
switch(action.type){
case LOCALE_SET:
return { lang: action.lang};
default:
return state;
}
}
SyntaxError: Unexpected token {
On npm start
you have an SyntaxError: Unexpected token {
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.