{"id":48789,"library":"normalizr","title":"Normalizr","description":"Normalizr is a library for normalizing and denormalizing JSON responses according to a schema, primarily used in Redux or Flux applications to flatten nested API data into a normalized state shape. This is version 3.6.2, the final stable release as the project is no longer maintained. It ships TypeScript type definitions and supports both ESM and CJS imports. Compared to alternatives like redux-orm or manual normalization, Normalizr offers a declarative schema-based approach without coupling to any specific state management library. It is stable but will not receive feature updates or bug fixes.","status":"abandoned","version":"3.6.2","language":"javascript","source_language":"en","source_url":"https://github.com/paularmstrong/normalizr","tags":["javascript","flux","redux","normalize","denormalize","api","json","typescript"],"install":[{"cmd":"npm install normalizr","lang":"bash","label":"npm"},{"cmd":"yarn add normalizr","lang":"bash","label":"yarn"},{"cmd":"pnpm add normalizr","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Direct named import works in both ESM and CJS. Since v3, the library is fully tree-shakable.","wrong":"const normalize = require('normalizr').normalize","symbol":"normalize","correct":"import { normalize } from 'normalizr'"},{"note":"Must use named import, not default import.","wrong":"import denormalize from 'normalizr'","symbol":"denormalize","correct":"import { denormalize } from 'normalizr'"},{"note":"The 'schema' object is a namespace containing Entity, Union, etc. Direct named import is correct.","wrong":"import * as schema from 'normalizr'","symbol":"schema","correct":"import { schema } from 'normalizr'"}],"quickstart":{"code":"import { normalize, denormalize, schema } from 'normalizr';\n\nconst user = new schema.Entity('users');\nconst article = new schema.Entity('articles', {\n  author: user,\n  contributors: [user]\n});\n\nconst inputData = {\n  id: '1',\n  title: 'My Article',\n  author: { id: '1', name: 'Paul' },\n  contributors: [{ id: '2', name: 'Nicole' }]\n};\n\nconst normalized = normalize(inputData, article);\nconsole.log(normalized);\n// {\n//   result: '1',\n//   entities: {\n//     articles: { '1': { id: '1', title: 'My Article', author: '1', contributors: ['2'] } },\n//     users: { '1': { id: '1', name: 'Paul' }, '2': { id: '2', name: 'Nicole' } }\n//   }\n// }\n\nconst denormalized = denormalize(normalized.result, article, normalized.entities);\nconsole.log(denormalized);\n// { id: '1', title: 'My Article', author: { id: '1', name: 'Paul' }, contributors: [{ id: '2', name: 'Nicole' }] }","lang":"typescript","description":"Demonstrates normalizing a nested article object with an author and contributors into a flat entities structure, then denormalizing back."},"warnings":[{"fix":"Consider forking the repository or migrating to an alternative library like redux-orm.","message":"Normalizr is no longer maintained.","severity":"deprecated","affected_versions":">=3.6.2"},{"fix":"Always pass the full entities map from normalize: denormalize(result, schema, entities).","message":"When using denormalize, the third argument must be the complete entities object; omitting it causes runtime errors.","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"Replace import normalizr from 'normalizr' with import { normalize } from 'normalizr'.","message":"Version 3.0.0 renamed 'normalizr' to 'normalizr' (the npm package name never changed), but the API shifted from a single default export to named exports (normalize, denormalize, schema).","severity":"breaking","affected_versions":">=3.0.0"}],"env_vars":null,"search_vec":"'3.6.2':36 'accord':12 'altern':62 'api':26,103 'applic':22 'approach':77 'base':76 'bug':96 'cjs':58 'compar':60 'coupl':79 'data':27 'declar':73 'definit':52 'denorm':9,102 'esm':56 'featur':93 'final':38 'fix':97 'flatten':24 'flux':21,99 'import':59 'javascript':98 'json':10,104 'librari':5,85 'like':63 'longer':46 'maintain':47 'manag':84 'manual':68 'nest':25 'normal':7,30,69,101 'normalizr':1,2,70 'offer':71 'orm':66 'primarili':16 'project':43 'receiv':92 'redux':19,65,100 'redux-orm':64 'releas':40 'respons':11 'schema':15,75 'schema-bas':74 'shape':32 'ship':49 'specif':82 'stabl':39,88 'state':31,83 'support':54 'type':51 'typescript':50,105 'updat':94 'use':17 'version':35 'without':78","created_at":"2026-06-07T16:58:28.497599+00:00","updated_at":"2026-06-07T16:58:28.497599+00:00","problems":[{"fix":"Ensure denormalize(result, schema, entities) is called where entities is the full entities hash.","cause":"Calling denormalize without the entities object as the third argument.","error":"TypeError: Cannot read property 'entities' of undefined"},{"fix":"Run npm install normalizr or yarn add normalizr.","cause":"Package not installed or missing from node_modules.","error":"Module not found: Can't resolve 'normalizr' in '/path/to/project'"},{"fix":"Use import { schema } from 'normalizr' to access the Entity constructor.","cause":"Importing the default export instead of the 'schema' named export.","error":"TypeError: schema.Entity is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/paularmstrong/normalizr","github":"https://github.com/paularmstrong/normalizr","docs":null,"changelog":null,"pypi":null,"npm":"normalizr","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}