easy-peasy icon indicating copy to clipboard operation
easy-peasy copied to clipboard

Cannot use computed properties with a function when doing SSR

Open ricardomatias opened this issue 4 years ago • 1 comments

When using easy-peasy with server side rendering, the store gets serialized and if there are computed properties which include a function as seen in the following example from the docs, there's an error because the store cannot be serialized due to a Getter function:

 getById: computed(state =>
    // 👇 return a function that accepts an "id" argument
    id => state.items.find(product => product.id === id)
  )

ricardomatias avatar Jun 23 '21 10:06 ricardomatias

What version of Node are you using?

ctrlplusb avatar Sep 15 '22 13:09 ctrlplusb