ts-pattern
🎨 The exhaustive Pattern Matching library for TypeScript, with smart type inference. (by gvergnaud)
react-freeze
Prevent React component subtrees from rendering. (by software-mansion)
Our great sponsors
ts-pattern | react-freeze | |
---|---|---|
38 | 3 | |
10,882 | 1,491 | |
- | 2.5% | |
8.5 | 4.0 | |
13 days ago | about 2 months ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ts-pattern
Posts with mentions or reviews of ts-pattern.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2024-02-08.
-
You Don't Need React
ts-pattern has been a decent band-aid for the lack of native pattern matching, but obviously has downsides that could be avoided if it was built into the language.
https://github.com/gvergnaud/ts-pattern
- Stop nesting ternaries
-
Building React Components Using Unions in TypeScript
ts-pattern
- Pattern Matching Library for TypeScript
-
TypeScript Is Surprisingly OK for Compilers
With how powerful the type system is you can implement pattern matching via a library pretty convincingly, https://github.com/gvergnaud/ts-pattern is definitely the go-to. That being said pattern matching is hardly a requirement for being ok for implementing compilers.
-
How to achieve type safety here possible without "type hacks"?
https://github.com/gvergnaud/ts-pattern might help
- ts-pattern v5
-
[AskJS] C# in every Node.js job posting?
There's a proposal to add something like that to JavaScript but it's been stuck in limbo since 2017 although there are libraries like ts-pattern which implement it already.
- Simplifying Dynamic Classes in Vue with the class-variance-authority library | cdruc.com
- Rust Appreciation Thread
react-freeze
Posts with mentions or reviews of react-freeze.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-10-14.
-
How does Reddit/Facebook etc make it so if you click a post it loads page but has return arrow so when you close out you go back to scrolling position? Are they loading content in a modal or are they saving scrolling position somehow?
React Freeze actually solves the rerendering issue mentioned.
-
What are your favorite small utility packages?
I recently came across https://github.com/software-mansion/react-freeze, which is React's Offscreen component implemented with Suspense. It's only <100 lines, but completely changes the way I architect my code.
-
React Native got another performance boost 🚀
In which case would something "hidden" be re-rendered? Is this when you have screen A that navigates to B and B does some logic that could update A via a redux/flux store? Would be helpful if it explained what the code is doing here https://github.com/software-mansion-labs/react-freeze/blob/main/src/index.tsx
What are some alternatives?
When comparing ts-pattern and react-freeze you can also consider the following projects:
pattern-grab - 🤛🏻 Regular Expression Data Grabber
constate - React Context + State
ts-adt - Generate Algebraic Data Types and pattern matchers
await-to-js - Async await wrapper for easy error handling without try-catch
union-types - A Typescript library for creating discriminating union types.
ts-option
typescript-coverage-report - Node command tool to generate TypeScript coverage report
proposal-pattern-matching - Pattern matching syntax for ECMAScript
Index - ⚡ Pattern Matching in Typescript
zod - TypeScript-first schema validation with static type inference
io-ts - Runtime type system for IO decoding/encoding
rescript-compiler - The compiler for ReScript.
ts-pattern vs pattern-grab
react-freeze vs constate
ts-pattern vs ts-adt
ts-pattern vs await-to-js
ts-pattern vs union-types
ts-pattern vs ts-option
ts-pattern vs typescript-coverage-report
ts-pattern vs proposal-pattern-matching
ts-pattern vs Index
ts-pattern vs zod
ts-pattern vs io-ts
ts-pattern vs rescript-compiler