effector / effector/eslint-plugin

Rule: `prefer-serializable-value-in-store`

Open
#91 1 comment 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
TypeScript
Stars
94
Forks
18
PR merge metrics
No merged PRs in 30d

Description

This code
```ts
const $data = createStore(new Date())
const setData = createEvent()

const scope1 = fork()

await allSettled(setData, { scope: scope1, params: new Date('2020-01-01') })

const json = JSON.stringify(serialize(scope))

const scope2 = fork()

hydrate(scope2, { values: JSON.parse(json) })
```

will produce error because `Date` will be serialized to ISO-format, but won't be deserialized back.

We can warn user about it

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.