ByteBullet

ByteBullet

Share this post

ByteBullet
ByteBullet
#04: Solito, ts-rest, Nativewind, typed-memo.ts
Copy link
Facebook
Email
Notes
More
User's avatar
Discover more from ByteBullet
Weekly curated list of packages, news and technologies every junior or senior React/Typescript developer needs. Shot directly to your inbox each Saturday!
Already have an account? Sign in

#04: Solito, ts-rest, Nativewind, typed-memo.ts

React Native + Next.js = ♥️. Incrementally adaptable API typing with ts-rest. Tailwind in React Native. Did you know React.memo does not accept generics?

Tomáš Falešník's avatar
Tomáš Falešník
Jul 29, 2023

Share this post

ByteBullet
ByteBullet
#04: Solito, ts-rest, Nativewind, typed-memo.ts
Copy link
Facebook
Email
Notes
More
Share

A word from me. If you enjoy my content, then let your friends or colleagues know using the button below. Me and your friends will greatly appreciate that because every developer will utilize this curated collection of packages and technologies!

Share

Welcome to this weeks edition of ByteBullet. This week we are heading into React Native territory but we still have great TypeScript libraries included.

Here’s a sneak peak of what’s in store:

  • Solito - The missing piece for using React Native with Next.js to build cross-platform apps

  • ts-rest - Incrementally adoptable type-safety for your new and existing APIs

  • Nativewind - Use Tailwind in React Native to build cross platform apps using universal style system

  • typed-memo.ts - The missing piece in @total-typescript/ts-reset which fixes generic type safety in React.memo

But before we shoot straight into this weeks edition, let me ask you a question:

Do you have a library, technology, opinion or just want to say “hi”?

Then do not hesitate to hit me up on twitter @ByteBulletDev or reply to this email directly!

Solito

Solito is a cross platform framework targeting react-native + Next.js stack. It can be used to create cross platform apps. Solito was featured as #3 on the front page of Hackernews. It can be used in combination with Nativebase, Nativewind or other cross platform UI frameworks to build great and easy to manage projects.

This is a bigger project to fit into a simple code snippet, thus I advise you to take a look and give some luck to the Solito project by Fernando Rojo.

ts-rest


EDIT: We are going to talk about ts-rest project, which is a full ecosystem of packages which brings adoptable type-safety into your projects.

I have mistakenly addressed @total-typescript/ts-reset before which fixes several TypeScript typing issues. We are going to talk about it next Saturday!


ts-rest is an incrementally adoptable type-safety system for your new and existing APIs. This is not just one package, this is a full ecosystem with adapters built for many notable tools like react-query, solid-query, express, next and more… Take a look at the following code example taken from their website!

ts-rest client code example
ts-rest client code example
ts-rest contract code example
ts-rest contract code example
ts-rest server code example
ts-rest server code example

Nativewind

Nativewind is a tool which uses Tailwind CSS scripting language to build a universal style system for React Native, which can also be used on web using a simple babel plugin. It can be also used in combination with Next.js.

Nativewind code example
Nativewind code example

The code example above (taken from their official website) can be simplified using babel preprocessor, which automatically wraps each component with the styled() function. Head over to their website and give them some love!

typed-memo.ts

And to finish off this edition we have a quick code snippet that @munigis suggested after @mattpocockuk created a pool asking:

If there was a ts-reset/react, what would you add to it? Top of my list is forwardRef, but I'm not sure I want to add it alone.

typed-memo.ts is a quick code snippet that fixes an issue that has been bothering react since the inception of React.memo. If you pass a generic to the component it will not give you type safe props.

typed-memo code example
typed-memo code example

In the code example above, the usage of name attribute will not be typed, unless you use the typed-memo.ts code snippet from above.

See you next Saturday!

Did you miss something? Want to talk about anything or just say hi? Shoot me a message @ByteBulletDev or reply to this email directly! ♥️

Join other successful engineers who receive this curated list of packages and technologies every Saturday!

Share this post

ByteBullet
ByteBullet
#04: Solito, ts-rest, Nativewind, typed-memo.ts
Copy link
Facebook
Email
Notes
More
Share

Discussion about this post

User's avatar
#07: Current state of state management
What are current options for state management? Why would I need a state manager? What is relevant? What is maintained? Everything answered in this…
Aug 19, 2023 • 
Tomáš Falešník
1

Share this post

ByteBullet
ByteBullet
#07: Current state of state management
Copy link
Facebook
Email
Notes
More
#02: Strictly<T>, Effect-TS, Result<T>, Prisma 5.0
Discover Strict Object Types, Prisma is finally getting the long awaited speed boost and Bid Farewell to Exceptions with Results and Effects!
Jul 15, 2023 • 
Tomáš Falešník
1

Share this post

ByteBullet
ByteBullet
#02: Strictly<T>, Effect-TS, Result<T>, Prisma 5.0
Copy link
Facebook
Email
Notes
More
Collection of React and TS Learning Resources
A constantly growing collection of valuable resources which will be handy whether you are a beginner or seasoned developer!🔥
Aug 27, 2023 • 
Tomáš Falešník

Share this post

ByteBullet
ByteBullet
Collection of React and TS Learning Resources
Copy link
Facebook
Email
Notes
More

Ready for more?

© 2025 Tomáš Falešník
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More

Create your profile

User's avatar

Only paid subscribers can comment on this post

Already a paid subscriber? Sign in

Check your email

For your security, we need to re-authenticate you.

Click the link we sent to , or click here to sign in.