-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stockticker refactored #10
Stockticker refactored #10
Conversation
Looks really good! The only issue I have is that What I'd like to see is a random slice and a random ID in that slice being updated each time. Tell you what - how about we move the randomization logic into a thunk or something in function updateRandomEntry() {
// calculate random slice
// calculate random ID
store.dispatch(updatePair(slice, id));
}
setInterval(updateRandomEntry, 50); |
Good idea. I moved the update logic to |
Thanks, appreciate it! If you can go ahead and do the same for the others (ideally today), that'd be great. |
So after merging this, I just realized there's an issue: function updateRandomPairInSlice() {
const sliceId = Math.floor(Math.random() * c.NUMBER_OF_SLICES) + 1;
const pairId = Math.floor(Math.random() * (c.NUM_ENTRIES / c.NUMBER_OF_SLICES)) + 1;
store.dispatch(updatePair(sliceId, pairId));
} The slices themselves are going to be numbered I'll tweak that and push the change. |
Right. removing the |
Yep, just fixed that and pushed. |
No description provided.