Permalink
Switch branches/tags
Nothing to show
Commits on Aug 30, 2014
  1. Stop passing around tile component

    ianobermiller committed Aug 30, 2014
    The logic around flipping tiles and marking them as correct was
    previously contained in methods that the Board called on the Tile
    component. While somewhat neat, this is not idiomatic react. Instead,
    the Tile class should get most of what it needs to render in its props,
    and all the logic should be contained in the Board class. In general,
    passing components around, calling methods on them, and accessing
    another component’s props are all anti-patterns.
  2. Use classSet for manipulating classes

    ianobermiller committed Aug 30, 2014
    Switch to React with addons and use classSet (common alias is `cx`)
    instead of manual concatenation.
  3. Remove redundant params in setState calls

    ianobermiller committed Aug 30, 2014
    The object passed to setState will be merged with the existing state,
    so no need to duplicate existing state properties.
  4. Rename handler functions

    ianobermiller committed Aug 30, 2014
    Rename the handler functions to be more decoupled from their parents.
    Wordform, for instance, doesn’t care about the game starting; it just
    needs to notify its parent when the user has entered valid words.
  5. Standardize quotes

    ianobermiller committed Aug 30, 2014
    Use single quotes in all javascript strings, but double quotes for
    string property values in jsx.
  6. Declare all props

    ianobermiller committed Aug 30, 2014
    Declaring propTypes is an easy way to check for programming errors and
    to see at a glance which props a component requires.
  7. Remove key property of Board

    ianobermiller committed Aug 30, 2014
    The previous change to conditionally render Board or Wordform allows us
    to remove the key property that was forcing Board to rerender. An
    alternative way to fix this, when Board was always being rendered but
    hidden, would be to implement componentWillReceiveProps in Board and
    reset the internal state.
  8. Use harmony transforms

    ianobermiller committed Aug 30, 2014
    The JSX transformer ships with a bunch of useful ES6 transforms that
    can be enabled by using the type “text/jsx;harmony=true”. The most
    useful are enhanced object literals
    (https://github.com/lukehoban/es6features#enhanced-object-literals) and
    arrow functions (https://github.com/lukehoban/es6features#arrows).
    
    Also perform a small amount of cleanup with respect to spacing, and
    some un-nesting of if’s in board.jsx.
  9. Switch between Board and Wordform without hiding

    ianobermiller committed Aug 30, 2014
    Instead of using classes to hide the Board or Wordform components,
    conditionally display one or the other based on this.state.playing.
Commits on Aug 28, 2014
  1. tweaks

    krawaller committed Aug 28, 2014
  2. Create README.md

    krawaller committed Aug 28, 2014
  3. fixes

    krawaller committed Aug 28, 2014
Commits on Aug 23, 2014
  1. delegate styles to tile

    krawaller committed Aug 23, 2014
  2. finished game

    krawaller committed Aug 23, 2014
Commits on Aug 22, 2014
  1. game stuff

    krawaller committed Aug 22, 2014
  2. initial commit

    krawaller committed Aug 22, 2014