Suprnovae / abc-totaal-notitieblok

1 stars 0 forks source link

Setup/plumbing #16

Closed vidbina closed 8 years ago

vidbina commented 8 years ago

Setting up Redux along with the remaining plumbing necessary to get things going.

Plan is to move to as much stateless presentational components as possible.

Problem

One thing that is killing me at the moment is rendering of new additions to the dataset. Somehow the state seems to be correcly mutated (e.g.: state.records contains the proper data), the renderRow method for the listview seems to be called, but the content displayed in the UI seems to be a clone of the first item that was rendered. Another thing of note is that the DataSource's rowHasChanged is never called, which may explain why things are broken.

It feels like passing the DataSource in passProps is the wrong strategy here. I expected to simply have the store available to everything that is contained by a Provider which is aware of the source.

Some Resources I Briefly Looked At

zirconias commented 8 years ago

hi @vidbina ,

i didn't understand the code you pushed, connect, dispatch, reduces...

did you inspect the componenet when first it is mounted ? somthing is wrong.

why redux and not reflux ? i read the tutsplus 'react native social app' they use reflux, it's niet , a bit complex but clean.

vidbina commented 8 years ago

You are not familiar with Redux, I suppose. If not don't worry, I'll find someone with Redux experience to help out or I'll tackle it when I'm available again 😉

zirconias commented 8 years ago

i'll try to see what can be done with redux, until you get some time to merge this pull :)

vidbina commented 8 years ago

Ha, @magickasoft I'm feeling like a real noob 🃏 here 😜 . Thanks for helping out. Great work 👍

zirconias commented 8 years ago

i knew that it was somthing about the const vars :D