Похожие чаты

Can someone help me understand this sintax? 🤔

10 ответов

12 просмотров
Isaac-. Автор вопроса

my first arrow function is taking and argument and then is returning another function so when i do pass the second argument i am executing the returning function well, it was confusing at first lol

Did you get it?

Isaac-. Автор вопроса
Abu
Did you get it?

yep... but isn't it rare? or better say, what are the use cases for this?

Isaac .
yep... but isn't it rare? or better say, what ar...

I use it quite often for saving temporary data in closure

Abu
I use it quite often for saving temporary data in ...

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures

Isaac .
screenshot my first arrow function is taking and argument an...

It's called higher order function pattern.

Isaac .
yep... but isn't it rare? or better say, what ar...

One case is action creator function in Redux thunk that you need to return another function to do asynchronous stuff

Isaac-. Автор вопроса
Abu
I use it quite often for saving temporary data in ...

Yes . Where I see it was in a react native project to pass some argument as first parameter and then a dispatch function , so it makes sense in that case .

Isaac-. Автор вопроса
AlY
One case is action creator function in Redux thunk...

I use redux Thunk brainless at this point . In this case was using it with useReducer , then I realized that it is what redux Thunk does

Похожие вопросы

Обсуждают сегодня

а через ESC-код ?
Alexey Kulakov
29
30500 за редактор? )
Владимир
47
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
Привет)) уже кажется эту тему перемусолили, но вот я так и не понял. Я сейчас сижу на 27дюймов 2к мониторе. На Актуальной макоси, если я куплю 27д 4к монитор: - будет ли изобр...
Vladislav Piskunov
15
Hi guys, any problem with Pulsebrige? Trying to transfer from wETH to ETH. First it tells me to connect my metamask "through mobile app" not desktop. Then I did and confirmed ...
Snowflakecrypto
13
any reference of this implementation?
BitBuddha
29
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
~
13
Страшнейшая правда про списки ЦБ. С первых дней жизни P2P сферы, молодые человеки, начитавшись законодательной базы и "внутренних" документов, решили, что им противостоит сер...
Foxcool
3
&"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\bin\Hostx64\x64\dumpbin.exe" /EXPORTS C:\Users\Yeet\Tauon\vcpkg\installed\x64-window...
Martin Rys
6
Карта сайта