根据模式规范化嵌套的 JSON

时间:2021-06-08 16:43:02
【文件属性】:
文件名称:根据模式规范化嵌套的 JSON
文件大小:866KB
文件格式:ZIP
更新时间:2021-06-08 16:43:02
Redux Tools normalizr 安装 使用 yarn 或 npm 从 NPM 存储库安装: yarn add normalizr npm install normalizr 动机 许多 API,无论是否公开,都返回具有深层嵌套对象的 JSON 数据。 对于 JavaScript 应用程序,尤其是那些使用 Flux 或 Redux 的应用程序,使用这种结构的数据通常非常困难。 解决方案 Normalizr 是一个小而强大的实用程序,用于获取带有模式定义的 JSON 并返回带有 ID 的嵌套实体,这些实体收集在字典中。 文档 介绍 构建文件 快速入门 API 规范化非规范化模式 使用 JSONAPI 示例规范化 GitHub 问题 关系数据 交互式 Redux 快速入门 考虑一篇典型的博客文章。 单个帖子的 API 响应可能如下所示:{ "id": "123", "author": { "id": "1", "name": "Paul" }, "title": "My很棒的博客文章", "comments": [ { "id": "324", "commenter": { "id": "2", "na
【文件预览】:
normalizr-master
----.gitignore(78B)
----README.md(3KB)
----CHANGELOG.md(3KB)
----typescript-tests()
--------github.ts(761B)
--------union.ts(337B)
--------object.ts(632B)
--------relationships.ts(1KB)
--------array_schema.ts(504B)
--------values.ts(253B)
--------entity.ts(1022B)
--------array.ts(494B)
----.github()
--------lock.yml(610B)
--------PULL_REQUEST_TEMPLATE.md(429B)
--------FUNDING.yml(74B)
--------ISSUE_TEMPLATE()
----rollup.config.js(807B)
----docs()
--------README.md(381B)
--------faqs.md(278B)
--------quickstart.md(1KB)
--------introduction.md(2KB)
--------api.md(14KB)
--------jsonapi.md(913B)
----examples()
--------github()
--------relationships()
--------.eslintrc(45B)
--------redux()
----LICENSE(1KB)
----husky.config.js(297B)
----.babelrc.js(395B)
----package.json(2KB)
----CONTRIBUTING.md(1KB)
----prettier.config.js(121B)
----src()
--------schemas()
--------__tests__()
--------index.js(4KB)
----.flowconfig(0B)
----jest.config.js(66B)
----index.d.ts(2KB)
----.eslintignore(59B)
----.travis.yml(183B)
----yarn.lock(285KB)
----.eslintrc.js(4KB)
----lint-staged.config.js(193B)

网友评论