react-dsfr
π«π· Design system React toolkit (by codegouvfr)
ts-pattern
π¨ The exhaustive Pattern Matching library for TypeScript, with smart type inference. (by gvergnaud)
Our great sponsors
react-dsfr | ts-pattern | |
---|---|---|
9 | 38 | |
395 | 10,832 | |
1.6% | - | |
9.6 | 8.5 | |
1 day ago | 7 days 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.
react-dsfr
Posts with mentions or reviews of react-dsfr.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-20.
- French State Design System React Integration
-
The french government's design system
My advice if you don't have a multi-million budget and you only need to support React is to start from MUI components. Components like Date pickers, or Autocomplete are complex and time consuming to code from scratch. First thing you want to do is to build a custom theme for MUI (example DSFR, Example OnyxiaUI) this will make the MUI components roughly match your design system out of the box. Then you can create your own components that are wrapper around MUI components and customize them until they match your design (Example). Trust me, we always underestimate the complexity of building base component from scratch. There are tons of things to consider, I don't even mention the accessibility concerns... Customizing MUI components is the quick win route.
-
Ensure you never forget a case in a switch
If you want a real-world use case you can consider this function, it has a very opaque and complex return type that is inferred from the input it receives. Having type-level unit test for this function is very useful both for ensuring the return type is inferred correctly and as an implicit documentation.
-
tsafe enables to unit test your types.
Do you think it's totological to test the return type of this function?
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.
- 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
What are some alternatives?
When comparing react-dsfr and ts-pattern you can also consider the following projects:
denoify - π¦For NPM module authors that would like to support Deno but do not want to write and maintain a port.
pattern-grab - π€π» Regular Expression Data Grabber
rescript-compiler - The compiler for ReScript.
ts-adt - Generate Algebraic Data Types and pattern matchers
onyxia-ui - π Onyxia UI toolkit
await-to-js - Async await wrapper for easy error handling without try-catch
tsafe - π© The missing TypeScript utils
union-types - A Typescript library for creating discriminating union types.
compodio - Putting the podcast in community radio
ts-option
tss-react - β¨ Dynamic CSS-in-TS solution, based on Emotion
typescript-coverage-report - Node command tool to generate TypeScript coverage report
react-dsfr vs denoify
ts-pattern vs pattern-grab
react-dsfr vs rescript-compiler
ts-pattern vs ts-adt
react-dsfr vs onyxia-ui
ts-pattern vs await-to-js
react-dsfr vs tsafe
ts-pattern vs union-types
react-dsfr vs compodio
ts-pattern vs ts-option
react-dsfr vs tss-react
ts-pattern vs typescript-coverage-report