From ec467fbd34f2a71789632646999494c8a3c06e2e Mon Sep 17 00:00:00 2001 From: Andy Street Date: Mon, 21 Nov 2016 09:53:40 -0800 Subject: [PATCH] Fix tic-tac-toe example is OSS Summary: flex: 1 is no longer correct Reviewed By: emilsjolander Differential Revision: D4182840 fbshipit-source-id: 912119c09d887d545a28d2855c5583f1d8d7c93e --- Examples/TicTacToe/TicTacToeApp.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Examples/TicTacToe/TicTacToeApp.js b/Examples/TicTacToe/TicTacToeApp.js index 9ccd9d9b0..958052333 100755 --- a/Examples/TicTacToe/TicTacToeApp.js +++ b/Examples/TicTacToe/TicTacToeApp.js @@ -1,4 +1,11 @@ /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * * The examples provided by Facebook are for non-commercial testing and * evaluation purposes only. * @@ -95,7 +102,7 @@ class Board { } class Cell extends React.Component { - cellStyle = () => { + cellStyle() { switch (this.props.player) { case 1: return styles.cellX; @@ -104,9 +111,9 @@ class Cell extends React.Component { default: return null; } - }; + } - textStyle = () => { + textStyle() { switch (this.props.player) { case 1: return styles.cellTextX; @@ -115,9 +122,9 @@ class Cell extends React.Component { default: return {}; } - }; + } - textContents = () => { + textContents() { switch (this.props.player) { case 1: return 'X'; @@ -126,7 +133,7 @@ class Cell extends React.Component { default: return ''; } - }; + } render() { return ( @@ -258,7 +265,6 @@ var styles = StyleSheet.create({ borderRadius: 5, backgroundColor: '#7b8994', margin: 5, - flex: 1, justifyContent: 'center', alignItems: 'center', },