This is why we play

Overview

This is why we play

js-standard-style Circle CI

group

Info

Demonstration

Games

game game_android

Players

player player_android

Teams

team team_android

Develop

iOS

  1. $ npm install
  2. $ npm run clean react-native unsupport for .babelrc since 0.16, so you have to remove all .babelrc in your project(includes packages)
  3. $ npm start
  4. Open your Xcode, select a simulator, click the play button or cmd + R

Android

  1. Same to official doc
  2. $ react-native run-android
  3. It's a bit complicated to those who are not familiar with Android development, like me

Design

The design is made by Sketch, you can find the original design file in Dropbox, it may help if someone wants to design new features.

Run in device

iOS:

  1. Check the official doc first, the following steps are based on official doc

  2. Comment console in lib/middleware/logger.js, because native environment doesn't support for console.group

  3. Generate js bundle: $ react-native bundle --entry-file index.ios.js --platform ios --bundle-output ./main.jsbundle

  4. Add js bundle into your project: open Xcode, select Files -> Add Files to... -> select the main.jsbundle file that just generated

  5. In Xcode, select your device, then click the play button or cmd + R

Android:

I never tried

To Be Continue

  1. Fix UI in Android
  2. Find a better way to organize css
  3. Unit test

License

MIT

Comments
  • Improve and fix plan

    Improve and fix plan

    Game list

    • [x] Should stop request when entering the game detail page and resume when turn back
    • [x] The animation between navigator need to be smooth (check InteractionManager)
    • [x] componentWillReceiveProps has been triggered twice, which could affect setTimeout of getting data
    • [ ] Android: space is insufficient for the list
    • [ ] Android: Need a cross-platform activity indicator

    Game Detail

    • [x] Page seems can't trigger refresh action automatically
    • [ ] The first line and first column of the list should be fixed when scrolling (check PanResponder)
    • [ ] Try to add video for this page
    • [x] setTimeout trigger twice
    • [ ] Android: Players plusMinus chart can't show tooltip

    Player search

    • [ ] Activity indicator when searching

    Teams

    • [ ] Activity indicator in navigation
    • [ ] Android: List space is not enough
    • [ ] Android: Page switch will stuck in the process(maybe caused by simulator)
    opened by wwayne 8
  • PlayerIndex Error

    PlayerIndex Error

    @wwayne seem to be getting this error

    2016-01-18 19:35:04.721 [warn][tid:com.facebook.React.JavaScript] null is not an object (evaluating 'playerList.filter') 2016-01-18 19:35:04.722 [error][tid:com.facebook.React.RCTExceptionsManagerQueue] Unhandled JS Exception: null is not an object (evaluating 'playerList.filter')

    any help on why?

    opened by cyprusglobe 3
  • createReducer functions seems wrong

    createReducer functions seems wrong

    When I used the createReducer function which implemented in utils/createReducer.js, I got the following error:

    One of the sources to assign has an enumerable key on the prototype chain. This is an edge case that we do not support. This error is a performance optimization and not spec compliant.

    Unhandled JS Exception: One of the sources to assign has an enumerable key on the prototype chain. This is an edge case that we do not support. This error is a performance optimization and not spec compliant.

    After I swap to the one which listed in Redux documentation, error gone:

    export default function createReducer(initialState, handlers) {
      return function reducer(state = initialState, action) {
        if (handlers.hasOwnProperty(action.type)) {
          return handlers[action.type](state, action)
        } else {
          return state
        }
      }
    }
    
    opened by Haotian-InfoTrack 3
  • Failed at the allyoop@1.0.0 start script 'node_modules/react-native/packager/packager.sh'

    Failed at the [email protected] start script 'node_modules/react-native/packager/packager.sh'

    When launching "nam start", got the following error:

    ERROR watchman--no-pretty get-sockname returned with exit code 1 2016-01-09T19:02:38,106: [cli] failed to identify PDU: fill_buffer: EOF 2016-01-09T19:02:38,107: [cli] unable to talk to your watchman on /usr/local/Cellar/watchman/4.1.0/var/run/watchman/xiong-state/sock! (Undefined error: 0)

    Error: watchman--no-pretty get-sockname returned with exit code 1 2016-01-09T19:02:38,106: [cli] failed to identify PDU: fill_buffer: EOF 2016-01-09T19:02:38,107: [cli] unable to talk to your watchman on /usr/local/Cellar/watchman/4.1.0/var/run/watchman/xiong-state/sock! (Undefined error: 0)

    at ChildProcess.<anonymous> (/Users/xiong/Documents/Application/react-native-nba/node_modules/react-native/node_modules/sane/node_modules/fb-watchman/index.js:196:18)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)
    

    Failed at the [email protected] start script 'node_modules/react-native/packager/packager.sh'.

    opened by xiongwuzhen 2
  • Error: app broken now?

    Error: app broken now?

    I love the look of the app and the article but unfortunately I can't get it to work :(

    I follow the instructions to install, but when I get it running I only get empty 'game' and 'players' screens, while clicking 'teams' results in a red screen error: Unexpected token < in JSON at position 0. I've replicated this twice with fresh git clones. I'm on XCode 7.3.1, OSx El Capitan and haven't made any changes to dependencies. I also get the two below errors in console: The regenerator/runtime module is deprecated; please import regenerator-runtime/runtime instead. '//@ sourceURL' and '//@ sourceMappingURL' are deprecated, please use '//# sourceURL=' and '//# sourceMappingURL=' instead.

    Do you know of any way to fix this? I'd love to give the app a try!

    opened by simonjblack 1
  • Not able to run with Android

    Not able to run with Android

    When I try to test this app with my android setup, I am not able run this app locally. Here is the react-native run-android command throws the error

    Commandrun-androidunrecognized. Did you mean to run this inside a react-nati ve project?

    However I ran the command from inside of project.

    opened by sumanbogati 1
  • GamePanel -> GameDetail

    GamePanel -> GameDetail

    Hi,

    It is more perhaps stupid question than an issue. I am bit lost in understanding your code. You open the GameDetails with the navigator from GamePanel. In the route you place game and date. In the GameDetails you get actions from the props. Where do they come from?

    Thank you

    opened by andtur 1
  • Player search

    Player search

    Search your favorite player then add it.

    • [x] 1. Player list JSON for retrieving
    • [ ] 2. Use player ID to get more information from official api
    • [x] 3. UserDefaults to store user's choice
    • [ ] 4. Lack of rookie's lst
    doing design 
    opened by wwayne 1
  • Function

    Function

    Game

    • - [ ] All game of today
    • - [ ] Check the detail of each game

    Player

    • - [ ] My favorite player list
    • - [ ] Search and add my favorite player
    • - [ ] Store favorite player data in app
    • - [ ] Demonstrate every my favorite player
    opened by wwayne 0
  • Don't run Android Project

    Don't run Android Project

    • What went wrong: A problem occurred configuring project ':app'.

    A problem occurred configuring project ':react-native-icons'. Could not download stetho.jar (com.facebook.stetho:stetho:1.2.0) > Could not get resource 'https://jcenter.bintray.com/com/facebook/stetho/stetho/1.2.0/stetho-1.2.0.jar'. > Could not GET 'https://jcenter.bintray.com/com/facebook/stetho/stetho/1.2.0/stetho-1.2.0.jar'. > Connection to https://jcenter.bintray.com refused

    How to resolve it ? I tried a lot of methods.

    opened by JeeseC 0
  • fixed-Only one default export allowed per module.

    fixed-Only one default export allowed per module.

    '/react-native-nba-app/app/containers/App.js':Only one default export allowed per module.

    export class default App extends Component {} ->export class App extends Component {}

    opened by kuangzheng 1
  • iOS模拟器运行失败

    iOS模拟器运行失败

    simulator screen shot 2016 9 1 3 30 23

    [tid:main] SyntaxError /Users/victoria/Documents/React-Native_Resource/Library/react-native-nba-app-master/app/containers/App.js: Only one default export allowed per module.

    opened by 0victoria0 10
Owner
Wang Zixiao
Wang Zixiao
Play with Xcode storyboards...

Storyboards In this repo, we will be playing with storyboards. Add Table View and Collection Views and show some data using the data source and delega

null 0 Oct 14, 2021
A Swift Playground to play around Combine

CombinePlayground A Swift Playground to play around Combine Why made this playground To help myself learn Combine, I re-implemented the same features

Jake Lin 5 Apr 17, 2022
Why not use UserDefaults to store Codable objects 😉

tl;dr You love Swift's Codable protocol and use it everywhere, who doesn't! Here is an easy and very light way to store and retrieve -reasonable amoun

Omar Albeik 452 Oct 17, 2022
DeepInfant® is a Neural network system designed to predict whether and why your baby is crying.

DeepInfant DeepInfant® is a Neural network system designed to predict whether and why your baby is crying. DeepInfant uses artificial intelligence and

Skytells AI Research 14 Oct 19, 2022
Play BreakOut while loading - A playable pull to refresh view using SpriteKit

BreakOutToRefresh Play BreakOut while loading - A playable pull to refresh view using SpriteKit BreakOutToRefresh uses SpriteKit to add a playable min

Dominik Hauser 2.5k Jan 5, 2023
▶️ video player in Swift, simple way to play and stream media on iOS/tvOS

Player Player is a simple iOS video player library written in Swift. Looking for an obj-c video player? Check out PBJVideoPlayer (obj-c). Looking for

patrick piemonte 2k Jan 2, 2023
📹 Framework to Play a Video in the Background of any UIView

SwiftVideoBackground is an easy to use Swift framework that provides the ability to play a video on any UIView. This provides a beautiful UI for login

Wilson Ding 333 Nov 23, 2022
🎉 WWDC 2021 Swift Student Challenge Winner 🎉 Dance Party allows users to record choreography and play against other users to try and match the key poses!

?? Dance Party ?? ?? WWDC 2021 Swift Student Challenge Winner ?? Installation Steps (Works on iPad Only) Clone or Download Unzip the .playgroundbook.z

Alan Yan 7 Oct 17, 2022
▶️ video player in Swift, simple way to play and stream media on iOS/tvOS

Player Player is a simple iOS video player library written in Swift. Looking for an obj-c video player? Check out PBJVideoPlayer (obj-c). Looking for

patrick piemonte 2k Dec 24, 2022
Little Go. An iOS application that lets you play the game of Go on the iPhone or iPad.

Introduction Little Go is a free and open source iOS application that lets you play the game of Go on the iPhone or iPad. You can play against another

Patrick Näf 121 Nov 26, 2022
YouTubePlayerKit A Swift Package to easily play YouTube videos 📺

A Swift Package to easily play YouTube videos ??

Sven Tiigi 304 Jan 7, 2023
A lightweight app to play videos from the Files app in a better (dark) interface which avoids losing your playback position.

Playerly Playerly is a very lightweight Swift app that allows you to select a file (video or movie) from the built in Document Browser, and play it in

Julian Schiavo 28 Dec 3, 2022
Play BreakOut while loading - A playable pull to refresh view using SpriteKit

BreakOutToRefresh Play BreakOut while loading - A playable pull to refresh view using SpriteKit BreakOutToRefresh uses SpriteKit to add a playable min

Dominik Hauser 2.5k Dec 29, 2022
iOS 15 share play API in react-native

react-native-shareplay iOS 15 share play API in react-native Installation yarn add react-native-shareplay And go to Xcode Capabilities and enable "Gro

Popshop Live 27 Oct 16, 2022
Play with Xcode storyboards...

Storyboards In this repo, we will be playing with storyboards. Add Table View and Collection Views and show some data using the data source and delega

null 0 Oct 14, 2021
SoundManager - A simple framework to load and play sounds in your app.

SoundManager - A simple framework to load and play sounds in your app.

Jonathan Chacón 3 Jan 5, 2022
Haptico 📳 - easy to use haptic feedback generator with pattern-play support

Haptico Haptico is easy to use iOS haptic feedback generator. Besides default haptic feedbacks it can play patterns! Checkout Example project. Table o

Sapozhnik Ivan 462 Jan 1, 2023
The easiest way to prepare, play, and remove sounds in your Swift app!

Chirp The easiest way to prepare, play, and remove sounds in your Swift app! ##Installation ###CocoaPods Installation Chirp is available on CocoaPods.

null 309 Dec 17, 2022
Async GIF image decoder and Image viewer supporting play GIF images. It just use very less memory.

YLGIFImage Asynchronized GIF image class and Image viewer supporting play/stop GIF images. It just use very less memory. Following GIF usually will co

Yong Li 1.8k Aug 15, 2022
High performance and delightful way to play with APNG format in iOS.

APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS. It's built with high-level abstractions and brings a

Wei Wang 2.1k Jan 2, 2023