₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,329,217 members, 8,439,334 topics. Date: Sunday, 05 July 2026 at 02:42 AM

Toggle theme

Qtguru's Posts

Nairaland ForumQtguru's ProfileQtguru's Posts

1 2 3 4 5 6 7 8 ... 76 77 78 79 80 81 82 83 84 (of 204 pages)

ProgrammingRe: Please I Need Help With This Reactjs Issue - Context Api & RTK (pictures) by qtguru(m): 9:24pm On Jan 18, 2023
Get rid of the Context, you're already using Redux Hooks, you don't need it. Just use only Redux, let each component query the reducer it needs.
ProgrammingRe: Please I Need Help With This Reactjs Issue - Context Api & RTK (pictures) by qtguru(m): 9:18pm On Jan 18, 2023
[quote author=Devdevdev post=120165256][/quote]You are using useDispatch wrong, because your code won't know which reducer to call I think

ProgrammingRe: Please I Need Help With This Reactjs Issue - Context Api & RTK (pictures) by qtguru(m): 9:15pm On Jan 18, 2023
Do this in your reducer. e.g return {...state, {amount: action.payload | value }} something like that
ProgrammingRe: Please I Need Help With This Reactjs Issue - Context Api & RTK (pictures) by qtguru(m): 9:14pm On Jan 18, 2023
The value return becomes the new state, and triggers every component listening to that, allowing them to receive the new copy. Try my suggestion.
ProgrammingRe: Please I Need Help With This Reactjs Issue - Context Api & RTK (pictures) by qtguru(m): 9:12pm On Jan 18, 2023
When you call a Dispatcher, it uses the type to know which reducer to call, it expects a return value, but you are doing a side-effect instead of returning something like this e.g
{...state,newProps}
ProgrammingRe: Please I Need Help With This Reactjs Issue - Context Api & RTK (pictures) by qtguru(m): 9:10pm On Jan 18, 2023
This is how the Dispatch is, it requires a type, also the point of the reducer is to return a new object combined from previous state and new update. What you're doing is an impure function. Look at this code i uploaded.

ProgrammingRe: Please I Need Help With This Reactjs Issue - Context Api & RTK (pictures) by qtguru(m): 9:01pm On Jan 18, 2023
also the item.id === payload what is that logic ?
ProgrammingRe: Please I Need Help With This Reactjs Issue - Context Api & RTK (pictures) by qtguru(m): 9:01pm On Jan 18, 2023
Devdevdev:
I switched to redux tool kit and I am still having the same issue. The clearCart and removeItem functionality are working just fine. It's just the addOne that isn't. I think the issue is with the 'amount' variable and how it's state is getting altered. I am seriously confused.
want to jump on google meeting, it's hard to debug on image
ProgrammingRe: Please I Need Help With This Reactjs Issue - Context Api & RTK (pictures) by qtguru(m): 5:14pm On Jan 18, 2023
@devdevdev
ProgrammingRe: Please I Need Help With This Reactjs Issue - Context Api & RTK (pictures) by qtguru(m): 5:03pm On Jan 18, 2023
debug the addOne method, if you can jump on Google meet or hit us on our slack.
ProgrammingRe: Please I Need Help With This Reactjs Issue - Context Api & RTK (pictures) by qtguru(m): 5:03pm On Jan 18, 2023
Why not use the debugger to enter the call stack and see if it hits the reducer, it's hard to debug at face value, is it online ?
ProgrammingRe: Please I Need Help With This Reactjs Issue - Context Api & RTK (pictures) by qtguru(m): 4:49pm On Jan 18, 2023
looking..
BusinessRe: Upwork Thread (Questions/Help/Advice) by qtguru(m): 11:06am On Jan 17, 2023
Cruisegallow:
Good morning sir. I am also a newbie video editor and I will also like to connect with your brother and join the platform sir. Thanks
Stay in Lagos ?
ProgrammingRe: General Exception by qtguru(m): 3:58pm On Jan 16, 2023
GREATIGBOMAN:
Boss me... Waiting for your post on that thread.
Yes o, you guys are making me proud and gingerly. Nice one bro
ProgrammingRe: General Exception by qtguru(m): 2:49pm On Jan 16, 2023
Won't it be easier to share a screenshot than we guessing?
RomanceRe: I Cheated But Do Not Want To Admit by qtguru(m): 5:38pm On Jan 15, 2023
I'd rather not know, if you stopped just don't tell me.
CrimeRe: Woman And Her Partner Arrested For Battering Her Two Kids Aged 5 And 2 (Graphic) by qtguru(m): 6:09pm On Jan 14, 2023
Moh247:
shocked


This done to a kid, this guys can kill an adult


.
Trust me this man can't attack his mate. The woman failed her kids.
ProgrammingRe: Algorithm And Data Structure Study Section by qtguru(op): 1:04pm On Jan 14, 2023
I'll join starting tomorrow , it will be fun
ProgrammingRe: Algorithm And Data Structure Study Section by qtguru(op): 1:04pm On Jan 14, 2023
GREATIGBOMAN:
I'm done building your app bro.

Also used tailwindCss instead before u go say I peep your code.

To save the image as Png I used htmlToImage and not the one you used, but your version wasn't that responsive and the shuffling was buggy.

Will share link with you when i wake up.
Respect. you didn't need to take the challenge but regardless you did and not bad at all.
CelebritiesRe: Kanye West Marries Bianca Censori In Secret Ceremony (Photos) by qtguru(m): 7:43pm On Jan 13, 2023
Romanoff:
Dude will never learn.

Still the same type of plastic white women who will strip him of all he's ever had.
Facts, the same
FamilyRe: My Ex Fiancee Is Pregnant For Me by qtguru(m): 2:54pm On Jan 13, 2023
Stevenbright:
You are being scammed!
Facts
CrimeRe: I Spent N60m On Ummukulsum – Chinese Man Who Killed His Lover Tells Kano Court by qtguru(m): 6:33pm On Jan 12, 2023
60m o boy shocked, a lot will kill for less, the price of simping gone wrong. cry
ProgrammingRe: How To Be A Software Engineer In 2023. by qtguru(m): 8:06am On Jan 12, 2023
Deasegun19:
boss use chatgpt to compose ur script
lol I just did, thanks
TravelRe: Canadian Student Visa Thread Part 22 by qtguru(m):
franugo:
Debit or credit?
Sorry it's 765 on ChipperCard my AccessBank is a Visa Gold it's tied to a DOM Account, it always works, this is the first time I'm seeing it fail. I checked the response code from UoW website and for my access it says Declined from the response code.

FInally went through with ChipperCard

1 2 3 4 5 6 7 8 ... 76 77 78 79 80 81 82 83 84 (of 204 pages)