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

Readme example leaves out most important part: slots #28

Closed
redbar0n opened this issue Oct 28, 2022 · 4 comments
Closed

Readme example leaves out most important part: slots #28

redbar0n opened this issue Oct 28, 2022 · 4 comments
Labels

Comments

@redbar0n
Copy link
Contributor

Readme says slots is the defining feature of xstate-tree:

Actors views are composed together via "slots", which can be rendered in the view to provide child actors a place to render their views in the parent's view.

But it leaves it out of the example, so it's hard to see how slots would look and feel when using xstate-tree to its full extent:

// If this tree had more than a single machine the slots to render child machines into would be defined here
const slots = [];
@redbar0n
Copy link
Contributor Author

The codesandbox example still only has one single child slot. It would be helpful if it had at least 2 or 3, to get an idea of how it scales.

@redbar0n
Copy link
Contributor Author

In the codesandbox: The slots are also passed into the view, but they don’t seem to be used there..

@UberMouse
Copy link
Collaborator

The slot is used here in the view https://codesandbox.io/s/xstate-tree-b0el6e-forked-4i6txh?file=/src/index.tsx:3304-3328

Feel free to expand the example with more slots :) there is no real difference between 1 and 3 slots except you have 3 slots defined and 3 slots rendered in the view.

github-actions bot pushed a commit that referenced this issue Nov 3, 2022
# [3.0.0](v2.0.11...v3.0.0) (2022-11-03)

### docs

* **README:** add note about expanded code sandbox example ([0ecfe63](0ecfe63)), closes [#28](#28)

### feat

* **routing:** async redirects ([e880467](e880467))
* **routing:** composable dynamic routes ([6f178ce](6f178ce))

### Breaking changes

* **routing:** Route creation functions have been changed to allow for dynamic routes to be composed together. This effects all route definitions
@github-actions
Copy link

github-actions bot commented Nov 3, 2022

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

2 participants