r002 / captains-log

Over the years, I've toiled away many nights & weekends on various pet projects; each always with its own repo, theme, and urls. Well, no more! Moving forward, all experimentations now live here! 😄
https://captains-log.web.app
0 stars 0 forks source link

♻ Refactor all 'Internal Service' "send..." calls to use React Context API instead #27

Closed r002 closed 3 years ago

r002 commented 3 years ago

Get rid of all of the global event handlers and custom event message sending. Refactor everything to use React's Context API and useState instead!


Ponder:

r002 commented 3 years ago

Update:

Today, I finished converting all of the custom global event handlers for log actions into DataContext. Log actions are now passed via DataContext and are all implemented in LogEntry.tsx like this:

https://github.com/r002/captains-log/blob/9108b25bb7d64cd4242c7afc699d2585244164bf/src/widgets/LogEntry.tsx#L63-L70