2
votes
Accepted
Refactor multiple if condition in JavaScript/TypeScript
Indentation Your current indentation is a bit confusing - the function's opening block's { line is not balanced with the closing block ...
2
votes
Accepted
how to destructure this.props react js
You don't really need to destructure at all, you can simply use props directly if you like
this.props.mesas.map(item => ...
example
...
2
votes
how to destructure this.props react js
I think the best way to refactor your problem is to use React programming pattern: a stateful, parent component passes down a prop to a stateless, child component. So, you don't ever need to declare <...
2
votes
2
votes
Accepted
Observable implementation
There is quite a lot of "almost similar" code due to the fact that you
treat "value observers" and "result observers" separately:
Two classes
...
2
votes
Awaited store for Svelte
Your awaitedStore function is rather verbose. All of the functionality for unsubscribing and resubscribing to the input store seems unnecessary. I also noticed that ...
1
vote
Reactjs Component Reusability
Big Red Exclamation Mark !
This is definitely not how you would design a generic component.
The TableItems component should not know anything about the current url, ...
1
vote
Multithreaded observer pattern in Rust
One issue is the type of your callback function:
fn on_changed(&self, callback: fn(T)) -> std::thread::JoinHandle<()> {
It is a ...
1
vote
UIView position updates based on device motion via RxSwift
You are correct that you are not using it correctly. For example Subjects are only needed to convert non-rx code into Rx code or to handle cycles. The fact that you have two of them is problematic.
...
1
vote
How generate a random pojo value using reactor.core.publisher.Flux and reactor.util.function.Tuples
I think I didn't write my question folloing the expectations of this forum. BTW, here is the solution for future readers.
I wonder if this is the best way to achive it since I am creating a new ...
1
vote
Merging client names into orders using RxJS
Looks good. Yeah, sometimes APIs are hard to work with.
Instead of the loop clientsData.forEach, you might want to reduce the client data down to an object, where ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
reactive-programming × 25java × 6
javascript × 6
typescript × 4
spring × 4
rxjs × 4
c# × 3
swift × 3
react.js × 3
functional-programming × 2
thread-safety × 2
ios × 2
observer-pattern × 2
rx-swift × 2
multithreading × 1
rust × 1
file × 1
android × 1
error-handling × 1
ecmascript-6 × 1
iterator × 1
authentication × 1
angular.js × 1
wpf × 1
winforms × 1