How to use the fluxible/addons.connectToStores function in fluxible

To help you get started, we’ve selected a few fluxible examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cesarandreu / quad-blog / client / components / PostList / PostList.jsx View on Github external
{posts.map((post, key) =>
              
            ).toArray()}
          
        
      
    )
  }
})

PostList = connectToStores(PostList, [PostStore], stores => {
  return {
    posts: stores.PostStore.getPostList()
  }
})

export default PostList
github cesarandreu / quad-blog / client / components / PostItem / PostItem.jsx View on Github external
className='post-item-content'
              dangerouslySetInnerHTML={{__html: post.get('body')}}
            />

            
          
        
      
    )
  }
})

PostItem = connectToStores(PostItem, [PostStore, RouteStore], (stores, props) => {
  const { currentRoute } = props
  const postName = currentRoute.getIn(['params', 'post'])
  const post = stores.PostStore.getPostItem(postName)
  return {
    post
  }
})

export default PostItem
github g0v / ppt / common / views / App.jsx View on Github external
);
      return (
        <div style="{styles.root}">
          
          
          
        </div>
      );
    }
}

App = connectToStores(App, [MetaStore], function(stores, props) {
  return {
    MetaStore: stores.MetaStore.getState()
  };
});

App = handleHistory(App);

App = provideContext(App);

export default App;