Skip to content

Using RTK query where user can interact with data and change the data #5003

@duchung95

Description

@duchung95

I am quite new to RTK query and looking to use RTK query in one of our app. I hope someone can guide me on this.
We have a dashboard page with 3 components:

  • A table on the left that display a list names where user can click each row to analyze the item in detail so each time user click a row, we make an API call to fetch the detail and store in Redux store. Let call the detail data as "points"

  • A table display (in the middle) the detail for the name item selected on the left table showing "points" of data (storing in the Redux store) and user can remove the rows of data by using a select box on the left most column.

  • A scatter plot on the right side where we display the points that are in the table in the middle and user can remove each point on the chart and the change will reflect on the table in the middle.

I am trying to use RTK Query to replace the useEffect (for fetching and manage data cache) and Redux store but haven't found a good way since the user can modify the data using the table in the middle or the chart. Please help pointing a way I can use RTK query or React Query in this case. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions