Skip to content
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

Rethrown errors difficult to debug #36

Open
tomatau opened this issue Feb 25, 2015 · 2 comments
Open

Rethrown errors difficult to debug #36

tomatau opened this issue Feb 25, 2015 · 2 comments

Comments

@tomatau
Copy link
Contributor

tomatau commented Feb 25, 2015

I'm finding that a lot of times the reThrown errors from Action.js are quite ambiguous and hard to trace down.

Often the stack trace is not visible as it is rethrown from inside the Action.js and masks the origin of the actual error - combined with source maps this has even more inconsistencies.

Attempting to recreate an error seems to not be working right now but this is definitely happening - will post more details when it happens again.

@kenwheeler
Copy link
Owner

I've been exploring removing Promises from McFly. Internally, Facebook seems to be handling async in the stores rather than the actions:

http://ianobermiller.com/blog/2014/09/15/react-and-flux-interview/

Thoughts? Promises feel like more trouble than they are worth.

@tomatau
Copy link
Contributor Author

tomatau commented Feb 25, 2015

I recently found this panel discussion https://www.youtube.com/watch?v=LTj4O7WJJ98 regarding flux - at a point they compare the two approaches used internally in Facebook by two teams. Seems like one team fetches (async) in stores and the other fetches in Action creators. The panel lead seems to prefer the ActionCreator async approach as it's easier to share logic and also not tie data to a specific endpoint.

I've been scaling fairly well with promises in action creators but I just lose some errors every now and then into a pyramid of promises.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants