Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

How does writing fit in? #17

Open
Syynth opened this issue May 5, 2015 · 3 comments
Open

How does writing fit in? #17

Syynth opened this issue May 5, 2015 · 3 comments
Assignees

Comments

@Syynth
Copy link

Syynth commented May 5, 2015

Do you currently have a way to handle writes and updates? Say for instance I want to implement a post box to go along with the news feed example, how could I build that in such a way that the news feed would at least know to re-run it's query?

@RickWong
Copy link
Owner

RickWong commented May 5, 2015

Thanks! You've brought up a good point. I haven't looked into how Relay and GraphQL do it officially, but this React issue touches the subject: facebook/react#3398

Sideways data loading (as in data that isn't passed-in as props) is something normally done by binding a component's this.setState to a data store's change event. That basically makes the React component react/observe/listen to newly inserted or otherwise updated data. I haven't brought this concept into Transmit, yet... If the observe API in the above linked React issue makes it into React core, then I'll definitely see if I can use that.

@miracle2k
Copy link

There seem to be a lot of questions regarding this (#4, #13).

It doesn't look like the observable support is going to get into react core so soon, and if it does, I'm not sure if it would mix well with react-transmit being a HOC. I would love to see support for observables in react-transmit itself.

@RickWong
Copy link
Owner

RickWong commented Jun 1, 2015

@miracle2k You're right. We shouldn't wait for React observe() as it's currently being reconsidered.

Checkout issue #25 where I posted a small update.

MrOrz added a commit to g0v/ppt that referenced this issue Jun 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants