Skip to content

Enhancement/App router with taskbar as layoutΒ #14

@fanesz

Description

@fanesz

Currently, there is a setup for page routing using react-router-dom at src/App.tsx, but there is only one route, which is the root (/).
By referencing to this: defining-routes,

  • Create private layout component at src/App.tsx that passing a children (for the main screen app), and taskbar component below it.
  • To make the taskbar become functional, create global context at src/AppContext.tsx that have initial value of page/app that currently opened
  • Declare the provider at the component property routes <Route path="/" element={<AppProvider><Layout /></AppProvider>}>
  • And then get the data from the AppContext state by using useAppContext at the Homepage and Taskbar component
  • The Layout component should be clean, so the main screen showing logic, should be still at Homepage, since it's a global context, every children component should be able to access the context
  • Make sure every functionalities is working
  • Make sure the layout have no differences at all

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

πŸ“‹ Empathize

Relationships

None yet

Development

No branches or pull requests

Issue actions