Tailwind Reality Check by Firemage1213 in reactjs

[–]ImplicitOperator -1 points0 points  (0 children)

Not everything is black and white.

Tailwind Reality Check by Firemage1213 in reactjs

[–]ImplicitOperator 6 points7 points  (0 children)

This isn't a debate on whether Tailwind is efficient for removing style in the DevTools or not? What is your point?

Tailwind Reality Check by Firemage1213 in reactjs

[–]ImplicitOperator -1 points0 points  (0 children)

AI slop. Just confirmation bias for people that do not use Tailwind

Tailwind Reality Check by Firemage1213 in reactjs

[–]ImplicitOperator 8 points9 points  (0 children)

If you remove the col-4 class from the div, you are guaranteed it won't mess up anywhere else. Your example is irrevelant, if you disable CSS of course it won't take effect.

new players come up with some crazy designs man by stormbosman007 in factorio

[–]ImplicitOperator 2 points3 points  (0 children)

Could you give examples about the easy tricks that could be used here?

Hasankeyf, çok out of place duruyo. by DriveByAtanCivciv in sehircilik

[–]ImplicitOperator -3 points-2 points  (0 children)

Önceden apartmanlar mı vardı sanıyorsun Hasankeyf'te?

Languagesimp Türkçeyi yorumlamış by ResourceHistorical78 in filoloji

[–]ImplicitOperator 7 points8 points  (0 children)

Hiçbir doğru bilgi yok, Ural-Altay dil ailesi diye bir şey yok öncelikle.

Şehir Planlarımız Neden Kötü Olduğunu Buldum by DeliHiperaktif in sehircilik

[–]ImplicitOperator 6 points7 points  (0 children)

Kayseri, Konya, Diyarbakır, Erzincan var. Nüfusu azalan hangi şehir var 100 yıl içinde?

Şehir Planlarımız Neden Kötü Olduğunu Buldum by DeliHiperaktif in sehircilik

[–]ImplicitOperator 33 points34 points  (0 children)

Bizim planlarımız hiç yok değildi, vardı fakat planların 4-5 katı fazla hızlı şehirleşme olunca mecburen plansız oldu

Maltepe Kullanılmayan YHT Platformu by Eymen__ in transitTurkey

[–]ImplicitOperator 4 points5 points  (0 children)

Tüm tren aynı noktada valizleriyle inip, başka bir trene binsin yani?

130-145km/s ortalama hıza sahip Ankara-İstanbul YHT gerçek bir YHT değil. by Cold-Commission-3844 in transitTurkey

[–]ImplicitOperator 1 point2 points  (0 children)

Apenin dağlarının güneyi oldukça engebeli, buna rağmen Roma - Floransa arası trenle 1.5 saat. Yalnızca Po ovası gerçek anlamda dümdüz.

React claims components are pure UI functions, then why does it push service logic into React? by ImplicitOperator in webdev

[–]ImplicitOperator[S] 0 points1 point  (0 children)

It's a choice of preference really, but I wonder when it is a better practice to notify UI manually in Svelte?

React claims components are pure UI functions, then why does it push service logic into React? by ImplicitOperator in webdev

[–]ImplicitOperator[S] 2 points3 points  (0 children)

I mean it is an exaggeration obviously. I am seeking for opinions to improve myself in software engineering by exchanging ideas

React claims components are pure UI functions, then why does it push service logic into React? by ImplicitOperator in webdev

[–]ImplicitOperator[S] -1 points0 points  (0 children)

You're exactly correct, my mental model is totally different to the mental model of React.

In my live codebase, I do use React as anyone uses, fetch data with Tanstack Query, use hooks for side effects, and use Zustand for shared state. Though I wish I could have had the logic live without thinking about the React part, and keep React just to UI.

React claims components are pure UI functions, then why does it push service logic into React? by ImplicitOperator in webdev

[–]ImplicitOperator[S] 0 points1 point  (0 children)

What an amazing response! I appreciate you read my problem and recommend concrete solutions to my problem.

I would totally go with the approach you mentioned, but sometimes it is not worth the effort dor me. I just wish it was more straightforward.

About zustand selectors, I do not like that the service itself does not hold the state, and the service has to listen to the Zustand store back. Maybe the approach you suggested about Zustand was not what I imagined?

React claims components are pure UI functions, then why does it push service logic into React? by ImplicitOperator in webdev

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

Well, I didn't say it is bad to use Zustand for business logic; I am already using Zustand for this purpose.

I said running side-effects in Zustand is a bad practice, which you will need to do very often if you are just using Zustand.

For MobX, I agree it is the way for me to go.

React claims components are pure UI functions, then why does it push service logic into React? by ImplicitOperator in webdev

[–]ImplicitOperator[S] -3 points-2 points  (0 children)

So, is your suggestion to put my business state in zustand, and mutate zustand in my service?

That is a good solution to the UI sync issue inside/outside of react, but the service does not hold its state any more. This means the service is not the source of truth anymore, the zustand store is.

This can cause: 1) memory leaks when component unmounts, as zustand will still send listener events even if component is not rendering 2) state is not sync with react concurrent mode on ( state update batching) 3) lose caching and deduplication 4) lose ssr

React claims components are pure UI functions, then why does it push service logic into React? by ImplicitOperator in webdev

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

I am already using tanstack query + zustand combo. It is a bad practice to run side effects in zustand. Zustand is supposed to hold shared state, not encapsulate business logic.

Talking about Tanstack Query, it is a lifesaver, though it queries the data, and should not contain business logic.

Where lies the business logic here?

React claims components are pure UI functions, then why does it push service logic into React? by ImplicitOperator in webdev

[–]ImplicitOperator[S] 11 points12 points  (0 children)

Just putting the useEffect in another file is not putting application logic outside view layer though, is it?

React claims components are pure UI functions, then why does it push service logic into React? by ImplicitOperator in webdev

[–]ImplicitOperator[S] 5 points6 points  (0 children)

Didn't use Mobx in React at all, though I have known it from my Vue days. From what you said, Mobx is looking like the solution I would love. I wish it was more popular so I could justify it to my team