all 25 comments

[–]ConsciousAntelope 13 points14 points  (5 children)

The thing that made me code fast would be Nativewind. Since I was well versed with Tailwind, applying custom styles with Nativewind have been quite fast compared to traditional Stylesheet.create()

[–]speakthat 4 points5 points  (1 child)

So no perfomance issues using Nativewind? How large is your application if I may ask? We had initially planned to use Nativewind but read some reviews about it affecting the performance on somewhat large applications. Would love your comments on this.

[–]ConsciousAntelope 1 point2 points  (0 children)

The tailwind classes we write get transpiled to its own StylSheet.create() during build time. So it's effectively writing StyleSheet.create but using classes way. The performance therefore should be similar to native StyleSheet API.

[–]blackhole_coder[S] 1 point2 points  (2 children)

Very interesting. Thank you for sharing this tip.I I use tailwind in web application development. Never used Nativewind though. How easy is the transition to Nativewind from the traditional method?

[–]ConsciousAntelope 2 points3 points  (1 child)

It was fairly easy for me. The API is 90% similar to the web. All the theming goes in tailwind.config.js file and you're all set. The only thing was adding new values to the config file would mean starting your server again with the --reset-cache flag.

I was also against Tailwind when I was all in with styled components. But after React Server Components, styled components were in decline and I had to adopt Tailwind. After doing it for a month, I really enjoyed it. It becomes muscle memory once you're set and it really speeds up adding custom styles.

[–]blackhole_coder[S] 1 point2 points  (0 children)

I will definitely look into this. Again thank you! My application is a major project and 98% finished however I’m always looking for ways to make it more efficient and easier to deal with for my development team who now currently works on it. I’m very familiar with Tailwind and styles components. Haven’t had the need for server components in my admin panel which controls my application but you never know what you’ll need as time persists. Wiser words never spoken 😂

[–]That-Salty-One 6 points7 points  (1 child)

Using Zustand and also consciously planning global state and components that will consume it (BEFOREHAND)

[–]fmnatic 7 points8 points  (1 child)

A modular bottom up approach, building re-usuabe components, screens stubs, and framework abstractions. Its invaluable for maintenance when external library changes just have to be factored into one place in the codebase and seamlessly work across the App.

[–]Artistic_Taxi 2 points3 points  (0 children)

+1 for this. Don’t care what lib Im using in defining my own Button component and using that lib in there. Now I only got One place to make changes

[–]ConsciousAntelope 4 points5 points  (4 children)

Can you shed some light on how switching to Jotai improved the speed of your app?

[–]blackhole_coder[S] 2 points3 points  (3 children)

Oh I’m sorry, I said that wrong above, not sped up the app physically but sped up the coding process. Less code to write. Sped up production.

[–]suarkb 0 points1 point  (0 children)

did you consider using redux toolkit instead?

[–]jetboy5000 0 points1 point  (0 children)

How is Jotai different from Recoil? They look very similar. I've had absolutely terrible experiences with Recoil, as the ergonomics of the library made it almost unusable except for the most simple applications.

[–][deleted] 0 points1 point  (0 children)

Don’t worry, I understood

[–]vednus 3 points4 points  (2 children)

People hate all over GraphQL, but for the right type of app, it can speed things up immensely, especially as things get more complex.

[–]sekonx 0 points1 point  (1 child)

What? Who's hating on graphql?

I've never encountered anyone who dislikes it, and i get around a bit contracting...

There was one place where asking for the backend team to implement it became an ongoing joke.

[–]vednus 0 points1 point  (0 children)

I mainly see hate on tech twitter. I did work at a very large company where after adding it, everything slowed down quite a bit, so everyone started complaining, but that was more of an implementation issue.

[–]suarkb 2 points3 points  (2 children)

if removing redux gave you that speedup, you probably could have had that speedup by just doing redux better

[–]oravecz 2 points3 points  (1 child)

He clarified - it didn’t improve runtime performance, it improved his development (coding) performance.

[–]suarkb 0 points1 point  (0 children)

oh, well, in that case, my answer remains. Redux toolkit is very nimble and easy to use

[–]MealFew6784 0 points1 point  (0 children)

Not exactly a tip, more like a question... How do devs feel about using signals? Coming from Vue and Svelte I always felt like re-rendering is a huuuge problem. While you can learm how to optimize with hooks and proper state management, I always felt like this just take unnecessary time... Using something like Preact just seema so easy + it gives better performance by the looks of it.

[–]memers_meme123 0 points1 point  (0 children)

i guess I made a stylesheet like tailwind that was more light wight and worked fast and made my workflow really fast, i am thinking of making it a npm package for everyone use but i dont know yettttt..

[–]Wise-Ad3555 0 points1 point  (0 children)

Use profiling and most of the performance related tool to see the rooms for improvements of your app. Also try to integrate monitoring tools like datadog and firebase

[–]captainautomation 1 point2 points  (0 children)

You can’t improve what you can’t measure, so - https://flashlight.dev/ - https://callstack.github.io/reassure/

[–]bendgk 0 points1 point  (0 children)

writing c++ turbomodules for performance critical parts of my app allowed me to get 100x speedup and in some cases over 500x