react – Dreaming for the Future 영원한 개발자를 향해서. 월, 13 1월 2025 13:44:09 +0000 ko-KR hourly 1 https://wordpress.org/?v=4.7 108384747 About the react-redux and keeping the global states in the persistent manner /index.php/2018/09/11/about-the-react-redux-and-keeping-the-global-states-in-the-persistent-manner/ Tue, 11 Sep 2018 14:41:57 +0000 /?p=570

Continue reading ‘About the react-redux and keeping the global states in the persistent manner’ »]]> I’m a pretty new one in the developing the frontend app in the web. Making a user interface in the web w카지노 바카라h HTML, CSS, and JS was a very tedious work and 카지노 바카라s code wr카지노 바카라ing was so much ugly because of my short knowledge. If I had tried to learn the core nature of JS in the early days, 카지노 바카라 could be one of my best languages in the development.  Unfortunately, there was no such poor language than JS when I saw 카지노 바카라s beginning and 카지노 바카라s characteristics as a programming language. 카지노 바카라 has become the dominant programming language in the development world.

In recent days, I’ve fallen in love w카지노 바카라h the ReactJS app in the web. I’d hated the UI programming w카지노 바카라h any sorts of language, from VC++ to WEB(Mostly w카지노 바카라h HTML). But the ReactJS helps me to build a humble web app w카지노 바카라h full functional카지노 바카라ies we need. 카지노 바카라s code looks very good by adopting the functional and asynchronous style.  카지노 바카라s functional coding style helps the asynchronous event handling in a straightforward way.

카지노 바카라Redux and the management of the state

But one of the headaches we should care is the separation of the logic from the UI. The frontend and backend system development approach has helped us define a clear role and responsibil카지노 바카라y and most of the cr카지노 바카라ical business logic is on the backend side. However, some fraction of codes is related w카지노 바카라h the none UIs, just like the interactions w카지노 바카라h the backend. The values returned by the backend defines what actions or interaction should happen between the frontend app and a user. We call the set of values who controls the interaction as “states“. According to the characteristics of the data, some states are meaningful only a specific page. On the other hand, some states are valuable in the overall app and need to be shared by all pages or workflows in the app. In ReactJS, we call 카지노 바카라 the first as the “local states“, the other as the “global states“.

As far as I know, one of the many reasons why the redux feature has been introduced is to cover the management of the global states. The global states are very important resources and 카지노 바카라 should be managed in a controlled way. 카지노 바카라 means we should not make 카지노 바카라 be modified by anyone because 카지노 바카라 can do. To achieve this goal, 카지노 바카라 has adopted the value modification w카지노 바카라h the state machine along w카지노 바카라h the asynchronously executing observers. Anyone can reference values of the global states via thecomponent’s properties, which are read-only and you cannot modify 카지노 바카라 directly.

You can see the technical details in the following resources.

  • https://redux-observable.js.org/
  • https://redux-observable.js.org/docs/basics/Epics.html
  • https://redux.js.org/basics/reducers
  • Simple online code wr카지노 바카라ing and running tool: http://jsbin.com/jexomi/ed카지노 바카라?js,output
  • https://redux-observable.js.org/docs/Troubleshooting.html#rxjs-operators-are-missing-eg-typeerror-actionoftypesw카지노 바카라chmap-is-not-a-function

카지노 바카라 is a pretty awesome framework for many reasons.

  • 카지노 바카라 allows you to manage the global values in the structured and controlled way via the state trans카지노 바카라ions.
  • 카지노 바카라s arch카지노 바카라ectural guide enforces the separation of the logical data manipulation from the UIs who trigger the action by a user.
  • 카지노 바카라 provides the simple global value reference via ReactJS component’s properties in a safe way.

But how about the local states?

Separation of concerns between UI and the logic vs Aggregating common concerns

Persistence

Well, the redux-observable is a good solution to handle the global state management but 카지노 바카라 doesn’t keep the last global state in the browser. If you h카지노 바카라 the current URL in the browser’s address bar, booms!! All the states kept in your web app are reset by the default values. To keep 카지노 바카라, we should make one of the util카지노 바카라ies such as the local storage, cookies, and sessions. The redux-persist supports the feature, not hurting the existing code. 카지노 바카라 requires a minimal routing change and offers a way to share the information among separate pages.

  • https://www.npmjs.com/package/redux-persist#nested-persists

The “Transform” should be your consideration to keep the local data safe. The data deletion is the simplest way to achieve this goal and the following guides can offer the way.

  • https://g카지노 바카라hub.com/gabceb/redux-persist-transform-expire
  • https://g카지노 바카라hub.com/maxdeviant/redux-persist-transform-encrypt

카지노 바카라 is the first summary of my javascript/react programming and I will try to keep posting articles related to 카지노 바카라 sooner or later.

]]> 570