Can you share the difficulties that Redux experienced in the State design process?

Asked 1 years ago, Updated 1 years ago, 104 views

It's iOS Jjorap Deployer.

I'm working on a project with Aneroyna WebFront. I heard that there are React (Redux?) and Reactive methods in WebFront.

If applied, I think I can share my concerns with WebFront in terms of implementation, so I'm applying Redux (Reswift) to iOS apps.

I'm leaving a question because I have a lot on my mind.

Regardless of language (js, java, swift) If you let me know the case you applied, I'll wrap it up.

redux

2022-09-22 08:32

1 Answers

Redux uses an asynchronous method similar to a typical Flux. Let's take a look at an example of the document you mentioned.

In the above code, first call dispatch(requestPosts(reddit); to forward the action. This action can also change the status. Then, you will be able to check the condition on the layer such as React and show the progress bar and so on.

And do fetch to update the asynchronous data.

If you look at the then part, this is the part that is called after fetch is done, but it calls dispatch (reddit, json) again to deliver the action. The updated data will update the status again.

It is common to configure the state to be fixed before renewal and then to be fixed again after an asynchronous call. With the help of Middleware, this process can be reduced more conveniently, but it is likely that the status will eventually be modified twice.

Since Redux uses one store, it seems important to design the state hierarchically and not touch the state that other logic uses. And it's also important to note that you create a new state without updating the state. You should use the existing state to create a new state that reflects the new value and store it in the store. The status of Redux should remain unchanged.

Reactive is often referred to as Rx, and I think it would be better to read the text and get the hang of it. See Create a reactive app with RxAndroid. (I'm worried that you're an iOS developer, but I'm uploading it because I heard Java is okay.)


2022-09-22 08:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.