This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // bad code | |
| function name(value) { | |
| return value.toUppercase(); | |
| } | |
| //good code | |
| function getUppercaseName(value){ | |
| return value.toUppercase(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Usage | |
| import React from 'react'; | |
| import { BrowserRouter as Router } from 'react-router-dom'; | |
| import Route from './AuthRoute'; | |
| import Login from './Login'; | |
| import Private from './Private'; | |
| export default () => | |
| <Router> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // store.js | |
| import { createStore, applyMiddleware } from 'redux'; | |
| import { routerMiddleware } from 'react-router-redux'; | |
| import createSagaMiddleware from 'redux-saga'; | |
| import rootReducer from './reducers'; | |
| import rootSaga from './sagas'; | |
| const sagaMiddleware = createSagaMiddleware(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import { Field, reduxForm } from 'redux-form'; | |
| import { connect } from 'react-redux'; | |
| import LaddaButton, { EXPAND_RIGHT } from 'react-ladda'; | |
| import { signinUser } from '../../actions/AuthActions'; | |
| class Login extends Component { | |
| constructor(props) { | |
| super(props); |