In react-typescript app, do you validate the data after a fetch/axios call to a RESTapi and if yes which library you use?

This page summarizes the projects mentioned and recommended in the original post on /r/reactjs

InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • zod

    TypeScript-first schema validation with static type inference

    Having said that: I prefer, and really love, zod. It's a high-quality library (there's some "clones" that may be slightly faster, but the code quality is very low). It's intuitive and easy to use. Relatively lightweight. It's schema-first, though: meaning, you define the schema in zod, and it infers your types from the schema. So if you want to generate schemas from types, then you'll need to look elsewhere.

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • tiny-schema-validator

    JSON schema validator

    Take a look at tiny-schema-validator . Totally not sponsered

  • ajv

    The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)

    You then turn that spec into runtime validators. For example, AJV- (JSON Schema validator)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Where DRY Applies

    3 projects | news.ycombinator.com | 3 Nov 2023
  • Has anybody used Typia library?

    3 projects | /r/typescript | 27 Jun 2023
  • How can we map data from JSON to typescript object efficiently?

    4 projects | /r/reactjs | 30 Apr 2023
  • Fastify: Support for Auto Type Inference (similar to TRPC)

    6 projects | /r/typescript | 16 Feb 2023
  • Typescript Runtime Validators and DX, a type-checking performance analysis of zod/superstruct/yup/typebox

    6 projects | dev.to | 12 Feb 2023