Differences in the inline and the normal way
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 28/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- frontend
调研方向
首先运行使用 preact-cli 创建的链接 stockroom-bug-demo,并比较使用 workerize-loader!./worker.store 和 inline import 的两个示例。检查观察到的 subscribe 方法,以及 separate inline stores 是否仍保持隔离;当两种行为在 Chromium 和 Firefox 中都符合所述预期时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Hi,
I expect a lot of bug with stockroom (or maybe I using it wrong ?)
I extract a little part of my webapp to inspect it, but I encounter an (other) probleme.
To reproduce the bugs : https://github.com/Buom01/stockroom-bug-demo (created with preact-cli)
the subscribe method
In this case, the "normal" usage, the store have not got the subscribe method defined:
import createStore from 'stockroom/inline'
import StoreWorker from 'workerize-loader!./worker.store'
let store = createStore(new StoreWorker())
console.log(store.subscribe) // undefined, WHY ?
While in the "inline" usage, the method subscribe is defined normally:
import createStore from 'stockroom/inline'
let store = createStore(require('./worker.store').default)
console.log(store.subscribe) // defined as a function
A probleme of shared store in the "inline" mod
Sorry because I can not totally reproduce the bug that I want to resolve due to the probleme with the subscribe method.
The probleme can be showed partially in the demo provided: I add only one document to each store, but in the inline mod, the store are mixed and finally they share their data. Then, they have both the same data while they should be isolated like in the worker mod. (Confirmed in my local project)
Tested in both Chromium(Version 67.0.3396.79 (Build de développement) Fedora Project (64 bits)) and Firefox(61.0) (latest)
- 主要语言
- JavaScript
- 星标
- 1.7k
- 派生
- 44
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
developit/stockroom 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 2/5 1-3 小时 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 30/100
查看 developit/stockroom 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
jfromaniello/url-join#134 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
-
难度 2/5 1-3 小时 新手友好度 60/100
quarto-dev/quarto-cli#15042 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 62/100
extendr/extendr.github.io#134 ·