StarWarsAPI : 2021.02.26 Object-Based Redux Store : Setting Initial State with Datas from External API

오범준·2021년 2월 26일
0

Data Setting Flow

1) set state for contents
Main Component

> query > get data > redux saga > set data to initialState of Redux

2) get datas for Ships, Rockets

> get state from redux after getting the data by queries 

Object Based Redux Store

How Can we get the info in Redux store as fast as we can ?

Assign unique Id to each datas
Which means, rather than using Array , use Object that wraps the entire data with each id assigned to it
With this approach, we are able to approach to each data with unique Ids, rather than looping thourgh the array of datas

Link
https://www.pluralsight.com/guides/deeply-nested-objectives-redux

profile
Dream of being "물빵개" ( Go abroad for Dance and Programming)

0개의 댓글