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

What do I use instead of Fragment? #32

Open
ogg opened this issue Mar 22, 2023 · 1 comment
Open

What do I use instead of Fragment? #32

ogg opened this issue Mar 22, 2023 · 1 comment

Comments

@ogg
Copy link

ogg commented Mar 22, 2023

I am moving from React, and I've been using the headless-ui.
I have a Transition:

<Transition.Root show={sidebarOpen} as={Fragment}>

What can I use instead of Fragment here?

@lxsmnsyc
Copy link
Owner

You can use this:

import { createMemo } from 'solid-js';

function Fragment(props) {
  return createMemo(() => props.children);
}

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