Advertisement · 728 × 90

Posts by Daniel

Preview
visulima/packages/tabular at main · visulima/visulima Visulima is the next-gen JavaScript framework for JAMStack blogs, sites & apps. - visulima/visulima

Looking for a high-performance terminal table for Node.js CLIs?

Check out @visulima/tabular:
• 2–3x faster than cli-table3
• Unicode + ANSI color support

GitHub: github.com/visulima/vis...

11 months ago 2 0 0 0

That's so funny, if you try to buy chatgpt on the Web app you need to pay 23€ per month, if you use the android app, it's only 21,99. Nice try

1 year ago 3 0 0 0

The --noEmit flag allows TypeScript to check types without generating JavaScript output. This makes TypeScript a pure static analyzer with no runtime impact, ideal for gradually adopting in large legacy codebases!

1 year ago 1 0 0 0

Even Node.js's new built-in TypeScript support can't strip enum code at runtime!

1 year ago 1 0 0 0
Post image

TypeScript enums have surprising gotchas that many experts avoid.
Unlike most TS features, enums generate runtime code and aren't erased during compilation. They can't be used as type constraints and cause bundle bloat.

1 year ago 2 0 1 0
Post image

TypeScript introduced private class fields before JavaScript did. Its initial private keyword was later replaced by JavaScript's standard # syntax for private fields.

1 year ago 3 0 0 0
Preview
visulima/packages/string/src/types.ts at main · visulima/visulima Visulima is the next-gen JavaScript framework for JAMStack blogs, sites & apps. - visulima/visulima

For more examples, explore the new string package for Node.js. You'll find extended string types that you can use in your next project.github.com/visulima/visulima/blob/m...

1 year ago 0 0 0 0
Post image

Template literal types let you create powerful string manipulation at the type level:

1 year ago 1 0 1 0
Post image

You can make TypeScript's type system Turing complete with recursive conditional types.
This means the type system itself can compute any algorithm... though you probably shouldn't 😅

1 year ago 0 0 0 0
Advertisement
Post image

TypeScript has built-in utility types for manipulating other types, but many devs reinvent them.

Instead of writing your own, use these standard ones:

1 year ago 0 0 0 0

Which pattern helps you the most?

I've found discriminated unions (#2) to be an absolute game-changer for complex state management.

Follow for more TypeScript + React tips that boost your productivity and code quality! ✨

1 year ago 2 0 0 0
Post image

Use type guards to ensure type safety in render methods:

1 year ago 1 0 1 0
Post image

Make component refs type-safe:

1 year ago 0 0 1 0
Post image

Type React event handlers properly:

1 year ago 0 0 1 0
Post image

Use type extraction for component props to keep your code DRY:

1 year ago 0 0 1 0
Post image

Leverage React.FC when you need access to children, defaultProps and contextTypes types:

1 year ago 0 0 1 0
Post image

Use discriminated unions for component states:

1 year ago 0 0 1 0
Post image

Kick off with precise component prop typing:

1 year ago 0 0 1 0
Advertisement

7 TypeScript patterns that will dramatically improve your React codebase 🧠

After reviewing 20+ production React+TS codebases, these patterns consistently separate the pros from the beginners.

Save this thread for your next PR review! 🧵👇

1 year ago 1 0 1 0

What workflow do you have for building node / react / vue libraries?

Do you have some dev server in user or just using vite for developing and some other tool for bundling?

1 year ago 2 0 0 0
Preview
packem/packages/packem at main · visulima/packem A fast and modern bundler for Node.js and TypeScript. - visulima/packem

🎉 Exciting update! Packem now supports CSS handling! Plus, you can now run commands or scripts automatically on a successful build. Streamline your workflows even more with this powerful library bundler! #webdev #opensource #nodejs #typescript #Packem

1 year ago 2 0 0 0