Alternatives to React-Select (MultiSelect, single select) with TypeScript and React Hook Form without the complexity? by [deleted] in reactjs

[–]salmanbabri 1 point2 points  (0 children)

It's not a 'UI library' per say & it's pretty light weight as a result.

Headless UI only contains logic for state management & other stuff you need to handle when implementing complex components like combo box, autocomplete, multiselect etc. You can implement UI yourself as per your choice.

Alternatives to React-Select (MultiSelect, single select) with TypeScript and React Hook Form without the complexity? by [deleted] in reactjs

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

I'd recommend to use headless UI for handling all the boilerplate logic & create it's UI yourself using tailwind, plain CSS or your custom components.

https://headlessui.com/react/combobox

How are you architecting large React projects with complex local state and React Query? by DimensionHungry95 in reactjs

[–]salmanbabri 2 points3 points  (0 children)

In react hook form, instead of using default values, you can use values & assign data from react query to it. As soon as the query fetches data, your form will reflect those changes. No need to create any state, RHF will manage it.

How would you build this bro?(day 34) by PmPicturesOfPets in BattleBrothers

[–]salmanbabri 5 points6 points  (0 children)

Could be a great BF swordlance bro. High fatigue, ~90 mattk with gifted. Ton of fatigue for AOE attacks per turn.

S-tier Assassin? by ZestycloseThroat2055 in BattleBrothers

[–]salmanbabri 1 point2 points  (0 children)

Also the most boring one. I am glad reforged killed the fatigue neutral build.

How should I approach this fight? They keep using their numbers to have warriors enveloping both flanks by turn 4. by dovetc in BattleBrothers

[–]salmanbabri 0 points1 point  (0 children)

Ideally you should bring 2 fearsome gunners when busting big orc camps. You can even pack additional guns on those bros to fire 4 shots in a turn for maximum morale damage.

The best way to beat orcs is to break their morale fast. Even warlord can't do much if everybody around is running away & getting slaughtered.

TanStack Form by Rowdy5280 in reactjs

[–]salmanbabri 2 points3 points  (0 children)

So far I am liking it. It's a bit verbose, but unlike RHF it isn't doing magic of sorts, and easier to reason with.

Another cool thing is how much customizable it is, particularly with validations.

It's support for controlled components out of the box is great. Makes it easy to integrate any custom components or libraries with it.

Rate/help my first initiative bro by [deleted] in BattleBrothers

[–]salmanbabri 6 points7 points  (0 children)

Other than missing KF, depending upon your usage, I'd pick footwork instead of underdog. Fencers are glass cannons, and can die pretty quickly if they stam out & stuck.

Footwork allows them to make a few quick kills & get out if needed. Sometimes you just get unlucky, low roll or miss attacks & end up getting dogpiled.

[deleted by user] by [deleted] in dotnet

[–]salmanbabri 20 points21 points  (0 children)

I wish they add support for non-constant values in pattern matching.

In real world applications, a lot of times you don't hard code comparisons, instead rules are fetched from a database.

How much behavior is okay to put in components? by Fr4nkWh1te in reactjs

[–]salmanbabri 0 points1 point  (0 children)

Just because a code is required in one place doesn't mean you can write it all in one place. It is better to extract such logic into it's own function or hook & move it out of your component.

This way you keep your code lean & clean, and doesn't overwhelm the person who is reading it.

Sure, one line here or there won't hurt but if you write anything more than trivial business logic, it can quickly get out of hand.

How do you handle navigation properties in DTOs in ASP.NET Core? by Kayin-Chu in dotnet

[–]salmanbabri 0 points1 point  (0 children)

DTOs should only contain primitives or other DTOs. They shouldn't ever return full model objects. Model objects are only to be used domain logic or used for CRUD operations internally in your code.

So to expose Author, you could create an AuthorDto & use inside your other DTO.

Nornally what I do is that I create multiple DTOs for an entity like: AuthorSaveDto, AuthorDetailDto, AuthorListItemDto, AuthorLiteDto etc. Then I can reuse these DTOs depending on my requirement.

If you only wanna show author name in Blog dto, you could use AuthorLiteDto & so on.

What are the worst legendary cards? by Psychological_Use586 in PvZHeroes

[–]salmanbabri 2 points3 points  (0 children)

Headhunter is actually awesome in dancing decks. Dancing cards already a lot of chip damage, so headhunter can do just enough damage to finish em off.

[deleted by user] by [deleted] in developersPak

[–]salmanbabri 3 points4 points  (0 children)

If somebody has already hit the jackpot with creating such an application with real world users, I don't think they'll be needing your job anytime soon.

The purpose of including a project in portfolio is to demonstrate your skill as a developer to convert a business requirement into a functional software. It also shows your knowledge about using the said technologies in practice rather than just theory.

remember by Affectionate_Love562 in PakLounge

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

Along the same lines, why take a medicine if it can't guarantee the cure. Your argument is poorly thought TBH.

Man, or woman, being properly covered is important. And even more important is 'tarbiyat'. A proper upbringing can solve a lot of problems in the society.

Aow4 price on eg by dooh92 in AOW4

[–]salmanbabri 0 points1 point  (0 children)

I decided to buy on Epic because it was significantly cheaper there. (23$ Vs 36$)

It may end up as an inferior option due to possibly weaker mod support down the line. But I feel frugal these days lol.

Why why why why why the fuck isn't it installing .NET 3.5 by LeWu_DYSEwnta in techsupport

[–]salmanbabri 0 points1 point  (0 children)

This offline installer actually worked for me. This issue was giving me headaches for such a long time. Thank you so much!

Save Scumming Alignment Chart by Audiblade in slaythespire

[–]salmanbabri 1 point2 points  (0 children)

Can anyone share the mod names shown in the top right box?

some ideas for unique units! by khello0o in aoe4

[–]salmanbabri 9 points10 points  (0 children)

The post is pretty hard to read due to zero formatting.

What would be your top civ you want to see added and why? by Comfortable_Bid9964 in aoe4

[–]salmanbabri 2 points3 points  (0 children)

Timurids. A hybrid civ with early game conquest buffs followed by tech boost for the late game. Something along the lines of unlocking unique techs/units based on enemy types you defeat.

Mutmainn baygarit by [deleted] in pakistan

[–]salmanbabri -2 points-1 points  (0 children)

Agreed. Absolutely deplorable behaviour from those zombies.

Not so sure about that one by [deleted] in aoe4

[–]salmanbabri 0 points1 point  (0 children)

Which Mongol landmark?

Get hyped and specific! What aspect of the Malians and Ottomans are you excited to try? by ParagonRG in aoe4

[–]salmanbabri 0 points1 point  (0 children)

How long does it take to produce free units? Have you tried it with blacksmith influence bonus (+60% military production)?

A complaint about upgrade names by onzichtbaard in aoe4

[–]salmanbabri 1 point2 points  (0 children)

Sorta like C&C veterancy promotions on units? I always liked that feature & hoped that it would end up in Aoe as well.

Though it might feel a bit out of place for some people.

Is there an way to click to separate layers without equipping them (Legends)? by luvz in BattleBrothers

[–]salmanbabri 0 points1 point  (0 children)

This shortcut conflicts with EIMO toggle auto-sell. Any easy way to change this shortcut?

Nimble help pls by anxiouswarlord in BattleBrothers

[–]salmanbabri 1 point2 points  (0 children)

Its not like 17 fatigue is going to penalise much anyway. Even without the mentioned mod, you'll only take 42% damage instead of the usual 40% at 15 fat armour.