SolidJSS
SolidJSโ€ข3y agoโ€ข
2 replies
tourist

idiomatic memo usage

is there a more idiomatic way to write this?
    const username = createMemo(() => state.data?.displayName?.toLowerCase().split(" ")[0]);

    return (
        <>
            <p>welcome{username() ? `, ${username()}` : ""}</p>
Was this page helpful?