Coder Social home page Coder Social logo

react-native-nba-app's Introduction

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

react-native-nba-app's People

Contributors

wwayne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-nba-app's Issues

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.

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
    }
  }
}

team crash

the process will crash when click the team tab

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?

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.

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.

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

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!

Design

group

  • Design for Game detail
  • Design for Player list
  • Design for Search player
  • Design for Player card

can't nav to GameDetail page

love your work!

i download the latest repo and run it on my iOS simulator , everything works fine except navigate to the GameDetail page

image

Improve and fix plan

Game list

  • Should stop request when entering the game detail page and resume when turn back
  • The animation between navigator need to be smooth (check InteractionManager)
  • 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

  • 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
  • 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)

意见征求

你好,想仿照当前App使用Flutter实现,征求下您的建议,期待你的回复~

Player search

Search your favorite player then add it.

  • 1. Player list JSON for retrieving
  • 2. Use player ID to get more information from official api
  • 3. UserDefaults to store user's choice
  • 4. Lack of rookie's lst

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'.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.