Xstate: respond not a root export as per documentation

Created on 14 Oct 2019  路  2Comments  路  Source: davidkpiano/xstate

Description
https://github.com/davidkpiano/xstate/blob/master/docs/guides/communication.md suggests that respond should be a root export however looking at the current source this does not appear to be the case. It is currently exported as a value on the actions export.

Expected Result
import { respond } from "xstate" should work.

Actual Result
Currently the following works:

import { actions } from "xstate"
const { respond } = actions

Additional context
Happy to submit a PR but not sure whether the code or documentation is incorrect. Personally I'd prefer respond to be a default export. While I'm at it would love log to be a default export as well. Understand you may wish to avoid polluting the export namespace however.

bug

Most helpful comment

We should export all of them, which I'll be doing before the release.

This also isn't public documentation, so I'll close this for now - the documentation on master has not been published yet 馃槄

All 2 comments

Seems like we might want to export more than only respond - there are a bunch of actions that are currently not exported directly.

@davidkpiano is there any rule of thumb here? should we just export all of them? or hide (under actions export) all of them in the future?

We should export all of them, which I'll be doing before the release.

This also isn't public documentation, so I'll close this for now - the documentation on master has not been published yet 馃槄

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carlbarrdahl picture carlbarrdahl  路  3Comments

amelon picture amelon  路  3Comments

kurtmilam picture kurtmilam  路  3Comments

bradwoods picture bradwoods  路  3Comments

rodinhart picture rodinhart  路  3Comments