-
Notifications
You must be signed in to change notification settings - Fork 469
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
Updating board data does not re-render the board? #19
Comments
You have to pass the board data as |
I used that exact example to start out @rcdexta so I have
boardData here will be modified by
What I dont understand here is for the life of me the board is empty after state is newly set by this.setState({ boardData: reponse }); |
…ccepting new changes to state v The same prop 'data' was used to share the current state of the board between the input prop data and the state maintained by the store/reducer. Now, due to namespace overlap, any new changes to data prop effected from outside Board component is not affected internally #19
I created a story to simulate this scenario and actually found a glitch in state management that was causing this issue. Thanks for bringing this up! The new behaviour that you are expecting is documented here: https://github.com/rcdexta/react-trello/blob/master/stories/AsyncLoad.story.js Pls try the latest build and revert back if it works for you... |
Yup I digged up the code and found whats wrong and fixed it with another loading-state alternating the render process. Not entirely sure why directly updating data didnt work but current workaround gave me better idea for implementation my board. Closing. |
Is there any way of updating the board data into DB like MongoDB or other NoSQL? I mean when I will dnd a card from one lane to another, I have to update the whole card in the state as well as in DB. |
…ccepting new changes to state v The same prop 'data' was used to share the current state of the board between the input prop data and the state maintained by the store/reducer. Now, due to namespace overlap, any new changes to data prop effected from outside Board component is not affected internally rcdexta/react-trello#19
…ccepting new changes to state v The same prop 'data' was used to share the current state of the board between the input prop data and the state maintained by the store/reducer. Now, due to namespace overlap, any new changes to data prop effected from outside Board component is not affected internally rcdexta/react-trello#19
Hi, I am currently having board data as a prop
boardData: {lanes: []}
in constructor() and then I try to fetch the lanes in componentDidMount(). My problem is that even after fetching successfully and this.state.boardData were updated, the board is still rendering with{lanes: []}
Is it not possible to render the board dynamically right now?
The text was updated successfully, but these errors were encountered: