Is React-Redux still useful as of 2023? [closed] - react-redux

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 days ago.
Improve this question
Why use react-redux, when we have hooks such as useContext and useReducer in React.
What are the further advantages to using Redux alongside react, which are not present in react itself - and how worth are those advantages?

If you have a global useContext and/or/with useReducer then all components using that context will re render no matter if the part of the sate they use has changed or not, if you also have a handler that is not wrapped in useCallback then virtual DOM compare will fail and these component will cause DOM updates. You can have multiple small contexts but then you have multiple sources of your state (could be good or bad depending on your needs and implementation).
React could be used with your own observable and useSyncExternalStore that has parts of global store or just one state for all components. With selectors it would prevent components from re rendering that did not have changed state.
If you don't want to write your own observable then you can just use Redux and connect it to React with react-redux.

Related

Is there visibility issue in golang? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
For example, if I update a global variable in one goroutine, then read the variable in another goroutine, can I get the newest value?
Another question is, can "atomic.Load*" and "atomic.Store*" ensure visibility?
Without explicit synchronization between goroutines, there is no guarantee that you will see the latest value of a shared variable. The Go memory model describes this:
https://golang.org/ref/mem
Atomic load/store have memory barriers, and they do guarantee you will see the latest value, though the Go memory model does not explicitly state this.

Is there a way to programmatically avoid EA trading under major FOREX news? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
May I know is there a way to programmatically detect major FOREX news and avoid trading in those time frame?
You need Forexfactory news indicator, "FFCal", that reads data from the website and returns true/false depending on time in minutes before/after major/mid/minor news events. you can download it on fxfactory website, use is rather simple
int result = (int)iCustom(Symbol(),0,"FFCal", (parameters),0,0);
Oh sure, sir, it is!
Let me share an example of such a fully automated / scripted approach:

Design patterns for shared state with many to many streaming [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I'm writing an online whiteboard application for fun, where multiple users view the same whiteboard and can draw on it. I'm using websockets (vanilla JS on the frontend, Scala on the backend), and right now am essentially just broadcasting mouse events from one user to the rest of the users, and rendering the image client-side.
However, this results in a transient shared state, whereas I would like to have users be able to hop on at any time and see the preserved shared state. I'm thinking this will probably require having shared rendering code on the backend and the frontend, so that clients render events as they stream but the server can send raw image data when clients associate.
So my question here is: what are some other design patterns I should be aware of for this kind of project? This is a for fun/learning project, so this is an open-ended question, but I'll accept an answer that contains some useful references for this kind of data flow.
So my question here is: what are some other design patterns I should
be aware of for this kind of project?
You don't have to have rendering code on the server. You can just save all the accumulated events that led to the current whiteboard and send those to a new client and let the new client render the whiteboard for itself as if they were listening when all the events originally happened.
If that's more data than is practical, then you can compress raw events. For example a straight or nearly straight line segment does not need all the intervening mouse positions, it really just needs the first and last position of the segment.

The best way to learn Ajax [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
My question is simple, which is the most logical way to learn to handle the concepts of ajax, and that time should be spent on each phase of this new model.
Simplest thing of learning something, is doing something.
First of all, you need to understand the fundametals.. what is AJAX, what was before AJAX and what exact issues does it solve.
After you might consider to learn jQuery AJAX API (http://api.jquery.com/category/ajax/) for client side and PHP (or any other language, that is easy to start) as server. And do some small tasks - as one of AJAX kata, it could be implementation of 'Google word suggest'.
Given you have some web development experience, I suggest the following book - it is really excellent in my opinion:
http://www.amazon.com/Ajax-Definitive-Anthony-Holdener-III/dp/0596528388/ref=pd_sim_b_3

Work Item naming conventions [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
What naming conventions do you use when creating work items in your task/bug tracking tools?
For example:
Do you prefix the items with an area/subject?
How do you begin scenarios/use cases? E.g., "The department manager can..."
How do you make it easier to detect duplicates?
Your project management, bug tracking and time management (if different from the pm tool) should follow the same pattern, no matter what the pattern is. I usually like to do a top down approach: project-application-page (for example: Amazon-Order Entry-Confirmation Page) - if the project/task management, bug and time management all follow the same pattern then you can track tasks to open issues to time spent easily. After the page you enter a short descriptive text of the issue. In the description area, you need to state:
environment (OS/browser)
version being tested
server environment (dev, QA, or production)
the bug (screen captures help greatly)
the expected results (what you expected to happen)
level of issue (show stopper to nice-to-have-but-will-never-get-done)

Resources