Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

even after updating the search code I dont see any changes in the stories screen... #49

Open
PManager1 opened this issue Nov 17, 2017 · 1 comment

Comments

@PManager1
Copy link

PManager1 commented Nov 17, 2017

  1. Also on clicking a singel story it doesnt go to the details view.

image

@kiok46
Copy link
Owner

kiok46 commented Dec 4, 2017

Hi @jpca999,

The sample data is imported from constants/data and stored in the variable storyData and later it is being used in the renderStories method.

To make the search work you'd need to update this storyData or add it to state everytime a new search happens.

In the code above, you need to add a state:

state: {
        stories: []
    }

and then use

componentWillMount(){
    // update the state using the API call and feed that data into `stories`
}

and later use renderStories

this.state.stories.map(this.getStoryData)

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants