Skip to content

Instantly share code, notes, and snippets.

https://github.com/tom-wagner/badmovies/tree/sample_solution
@R-SE
R-SE / ReactNotes.md
Created May 13, 2018 23:04
React Notes

Main points:

  • stateful/ES6 class components vs stateless/functional components
class App extends React.Component {
  constructor(props) {
    super(props)
  }
  render() {
    return (
 
@R-SE
R-SE / AngularJS.md
Created May 11, 2018 02:42
Angular

View - the HTML. Model - the data available for the current view. Controller - the JavaScript function that makes/changes/removes/controls the data.

AngularJS extends HTML attributes with Directives, and binds data to HTML with Expressions.

<div ng-app="" ng-init="firstName='John'">
  <p>Name: <input type="text" ng-model="name"></p>
  <p ng-bind="name"></p>
  1. Create store
  • import { createStore } from 'redux'
  • const store = createStore(mainReducer)
  1. Use Provider to connect react and redux
  • import { Provider } from 'react-redux'
ReactDOM.render(<Provider store={store}><App /></Provider>, document.getElementById('app'));