How to use the effector-react/ssr.useStore function in effector-react

To help you get started, we’ve selected a few effector-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zerobias / effector / examples / react-ssr / src / app.tsx View on Github external
const Meta = () => (
  <p>
    This page is rendered on <b>{useStore(isServer) ? 'server' : 'client'}</b>
  </p>
)
const User = () =&gt; <h2>{useStore(user)}</h2>
github zerobias / effector / examples / serverless-ssr / src / app.tsx View on Github external
const Total = () =&gt; <small>Total: {useStore(friendsTotal)}</small>
const FetchingStatus = () =&gt; {
github zerobias / effector / examples / react-ssr / src / app.tsx View on Github external
const Total = () =&gt; <small>Total: {useStore(friendsTotal)}</small>
const FetchingStatus = () =&gt; {
github zerobias / effector / examples / react-ssr / src / app.tsx View on Github external
const User = () =&gt; <h2>{useStore(user)}</h2>
const Friends = () =&gt; useList(friends, friend =&gt; <li>{friend}</li>)
github zerobias / effector / examples / serverless-ssr / src / app.tsx View on Github external
const FetchingStatus = () =&gt; {
  const pending = useStore(fetchUser.pending)
  return (
    <p>
      <small>Status: {pending ? 'fetching...' : 'ready'}</small>
    </p>
  )
}
const UserList = () =&gt; {
github zerobias / effector / examples / serverless-ssr / src / app.tsx View on Github external
const User = () =&gt; <h2>{useStore(user)}</h2>
const Friends = () =&gt; useList(friends, friend =&gt; <li>{friend}</li>)
github zerobias / effector / examples / serverless-ssr / src / app.tsx View on Github external
const Meta = () =&gt; (
  <p>
    This page is rendered on <b>{useStore(isServer) ? 'server' : 'client'}</b>
  </p>
)
const User = () =&gt; <h2>{useStore(user)}</h2>
github zerobias / effector / examples / react-ssr / src / app.tsx View on Github external
const FetchingStatus = () =&gt; {
  const pending = useStore(fetchUser.pending)
  return (
    <p>
      <small>Status: {pending ? 'fetching...' : 'ready'}</small>
    </p>
  )
}
const UserList = () =&gt; {