type-fest
bulletproof-react
Our great sponsors
type-fest | bulletproof-react | |
---|---|---|
32 | 250 | |
13,221 | 22,702 | |
- | - | |
9.0 | 5.3 | |
1 day ago | about 2 months ago | |
TypeScript | TypeScript | |
Creative Commons Zero v1.0 Universal | MIT License |
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.
type-fest
-
Adding type safety to object IDs in TypeScript
Related: https://github.com/sindresorhus/type-fest/blob/main/source/o...
-
Enforcing Localization through Types
Typescript doesn’t natively provide an Opaque type that we can use to define a string that has already been localized. If the data looks like a string, Typescript will consider it a string. We can however use utility types that simulate opaque types, like the Opaque definition in type-fest:
- Is there a better way to do read-only types
-
Boost Your JavaScript with JSDoc Typing
With these powerful features, you can create dynamic and expressive types. One last thing I want to mention before moving on, is that you can install libraries with which you can add more types to your project like type-fest or utility-types. These libraries contain a lot of useful types that you can use in your project.
-
Essential Code Organization Principles
Also, it’s not as restrictive as mutability tools — if you know what you are doing and want to ignore this limitation for a particular case, you can apply the -readonly modifier or the Writeable type from type-fest or ts-essentials.
-
Best practice for typing server data for get vs post in client code
Remember you can derive one type from another type so you can make sure they don't diverge. SetOptional type util
-
All JavaScript and TypeScript features of the last 3 years explained
Some folks have built whole SQL databases and DSL compilers in the TS type system. These tend to be toy projects with disclaimers not to use them. But the type system being Turing complete[0] (for better or worse), pretty much whatever you can imagine. This project[1] is one I actually return to frequently for practical ideas.
0: https://github.com/microsoft/TypeScript/issues/14833
1: https://github.com/sindresorhus/type-fest
-
Question on how to handle an object that can have different states and avoid assertions.
Have a look at SetRequired and SetOptional in type-fest
-
Preventing more parameters being passed than needed by a type definition?
Try the Exact method provided by Type Fest, looks like it does what you're looking for
-
Creating a derived type of only required parameters from a base type?
This is a fairly common scenario and available via libraries like type-fest or implementable with a couple lines of code.
bulletproof-react
-
Coding Snippets Dev Log (9/27/23)
Using -> this guide to help structure a project in a better way
-
Best File Structure
bulletproof react
-
Beware of teammates who refactor code based on personal taste without proper documentation or completeness. Sounds familiar.
Well I’d definitely have a file structure in place. I use bullet proof react as my go to. But I mean like…I’d say there’s probably 10 things causing 90% of the problems. So things like folder structure, yes, but also how long the files are, I mean…how enmeshed it all is…maybe the naming conventions.
-
My React Beginner Project
Follow this: https://github.com/alan2207/bulletproof-react
-
What's the best component / folder architecture for a project to scale?
Your approach is similar to bulletproof-react, which I personally love. I have built projects of all sizes with it and the DX was always nice! Check it out if you want and good luck on your project 😁
-
Are there any react js best practices websites?
Link for the lazy ones.
-
Inspiration for my first React project
Not sure if this helps, but Bulletproof React is a very good architecture to React projects of any size. Maybe it can give you some insight on how to structure your project. Good luck!
- Software Architecture in React
- Software Architecture in frontend
-
Best practices for organizing projects files in react
Been content with how Bulletproof react does it, only thing missing for me is differentiation between views and components.
What are some alternatives?
ts-toolbelt - 👷 TypeScript's largest type utility library
react-clean-architecture - A realistic approach to implement clean architecture on react codebases
runtypes - Runtime validation for static types
documentation - 🍰 Architectural design methodology for Frontend projects
tss-react - ✨ Dynamic CSS-in-TS solution, based on Emotion
excalidraw - Virtual whiteboard for sketching hand-drawn like diagrams
zod - TypeScript-first schema validation with static type inference
redux-toolkit - The official, opinionated, batteries-included toolset for efficient Redux development
ts-essentials - All essential TypeScript types in one place 🤙
payload - The best way to build a modern backend + admin UI. No black magic, all TypeScript, and fully open-source, Payload is both an app framework and a headless CMS.
variant - Variant types in TypeScript
SAAS-Starter-Kit-Pro - 🚀A boilerplate for building Software-as-Service (SAAS) apps with Reactjs, and Nodejs