Page MenuHomePhabricator

Replace Redux with useReducer() & Redux Observable with useEffect()
Open, NormalPublic5 Story Points

Description

Problem
When the InteractionTimeline was created, Redux and Redux Observable where the best solutions for state management in React.

Since that time, React 16.8 has been released which provides first-class state management with useReducer() and side-effect management with useEffect().

Solution
Modernize the application by replacing Redux and Redux Observable with useReducer() and useEffect() respectfully. It might also be helpful to use the useReactor() library that @dbarratt wrote.

To ease the transition, it would probably be best to use useContext() since Redux uses context internally to make the store available to components.

Event Timeline

dbarratt created this task.Jul 1 2019, 2:20 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 1 2019, 2:20 PM
dbarratt renamed this task from Replace Redux with useReducer & Redux Observable with useEffect to Replace Redux with useReducer() & Redux Observable with useEffect().Jul 1 2019, 2:20 PM
dbarratt added a subscriber: Niharika.

@Niharika It might be wise to block further enhancements to InteractionTimeline on this task.

dbarratt updated the task description. (Show Details)Aug 6 2019, 8:00 PM
Niharika triaged this task as Normal priority.Aug 8 2019, 6:10 PM
Niharika set the point value for this task to 5.

@dbarratt Are you still working on this task? We could drop it from the board, otherwise. I'd rather wrap up blocks and get started with CU now.

@dbarratt Are you still working on this task? We could drop it from the board, otherwise. I'd rather wrap up blocks and get started with CU now.

It's about ~60% completed, but honestly I'm fine dropping it for now. I can always pick it back up later. :)
https://github.com/wikimedia/InteractionTimeline/pull/101

@dbarratt Are you still working on this task? We could drop it from the board, otherwise. I'd rather wrap up blocks and get started with CU now.

It's about ~60% completed, but honestly I'm fine dropping it for now. I can always pick it back up later. :)
https://github.com/wikimedia/InteractionTimeline/pull/101

Cool. Let's leave it out for now.