Hey guys,
I’m trying to pass an observable (MobX) to my data container (Meteor). Currently, I’ve modified the typical createContainer like this:
@observer
class Container extends React.Component {
render() {
const searchString = new RegExp(SearchStore.searchString,"ig"); // MobX observable from store
const DataContainer = createContainer((props) => {
return {
playlist: Playlist.find({title:searchString});
};
},HeaderComponent);
return <DataContainer/>
}
}
This is working pretty will on our device. I have to say that we are using it on a RN application. I’m just wondering if this is the best solution, because every change (render) would generate a totally new createContainer element.
Normally it should be reactive. You pass the changing observables of MobX down to the Meteor container which updates on new properties or changed Tracker values.
excuse me,I don’t understand what you mean. this is my problem
I have a filter for my table. I want filtering data from server. in my container I was pass selector to subscribe and get filtered data from server. also I want real time selector, that’s mean: typing some text and text send to subscribe. with no clicking button. like this:
I just mean if your console.log fires if you change observableTackStore.filterObj. Normally both should fire (in your UsersContainer and UsersMeteorContainer).