Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Meta = () => (
<p>
This page is rendered on <b>{useStore(isServer) ? 'server' : 'client'}</b>
</p>
)
const User = () => <h2>{useStore(user)}</h2>
const Total = () => <small>Total: {useStore(friendsTotal)}</small>
const FetchingStatus = () => {
const Total = () => <small>Total: {useStore(friendsTotal)}</small>
const FetchingStatus = () => {
const User = () => <h2>{useStore(user)}</h2>
const Friends = () => useList(friends, friend => <li>{friend}</li>)
const FetchingStatus = () => {
const pending = useStore(fetchUser.pending)
return (
<p>
<small>Status: {pending ? 'fetching...' : 'ready'}</small>
</p>
)
}
const UserList = () => {
const User = () => <h2>{useStore(user)}</h2>
const Friends = () => useList(friends, friend => <li>{friend}</li>)
const Meta = () => (
<p>
This page is rendered on <b>{useStore(isServer) ? 'server' : 'client'}</b>
</p>
)
const User = () => <h2>{useStore(user)}</h2>
const FetchingStatus = () => {
const pending = useStore(fetchUser.pending)
return (
<p>
<small>Status: {pending ? 'fetching...' : 'ready'}</small>
</p>
)
}
const UserList = () => {