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

Docs: Conditional rendering #117

Open
raquo opened this issue May 9, 2022 · 0 comments
Open

Docs: Conditional rendering #117

raquo opened this issue May 9, 2022 · 0 comments

Comments

@raquo
Copy link
Owner

raquo commented May 9, 2022

Note to self: people keep asking how to do this, therefore our docs don't do a good job of explaining it.

After the docs are updated for 15.0.0, review what's there and probably create a new section. Seems like right now we don't even have a dedicated section for child.maybe. IIRC 15.0.0 introduces a new filterWith(signalOfBool) method, so that's sort of kind of another option, although it behaves differently. Maybe we need a similar operator for Laminar itself... There's an issue filed on that already.

child.maybe <-- myObservableOfOptionA

child <-- observable.map(... => if (...) createMyElement() else emptyNode)

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

No branches or pull requests

1 participant