question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add constant components in top-level component

See original GitHub issue

Idea:

To make a united layout throughout the app.

  1. Include top-level components like navbar, constant images like logos in a top-level component such as Layout.js. Remove them from DiagnosticContainer component
  2. Use Material-UI theming
  3. As per @friedger and @AdhamAH suggestions, keep constant components in Layout.js’ and React providers in ‘App.js’

Motivation:

  1. Keep consistency in the styling of the app
  2. Make it easier for anyone new coming on board to follow the same flow
  3. Start implementing Material-UI

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
friedgercommented, Mar 25, 2020

I think it is good practise to put all the react providers in App.js and the constant components into something like Layout.js, then the components for all routes can make use of Layout as top level component.

2reactions
SomeMooserycommented, Mar 25, 2020

I think anything top-level like this could go within App.js, unless that’s bad practice, not too sure.

I was thinking DiagnosticContainer would be the wrapper component for the Health Log, containing both the overview and also weekly view. I don’t know if we should repurpose this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Hook inside constant - Stack Overflow
I am beginner I think I have to use component for it but I'm not sure how to import routes constant from component....
Read more >
Top-level statements - C# tutorial - Microsoft Learn
This tutorial shows how you can use top-level statements to experiment and prove concepts while exploring your ideas.
Read more >
Guide to components in Figma
Overview. Components are elements you can reuse across your designs. They help to create and manage consistent designs across projects.
Read more >
12 Customize Variables and Constants - Oracle Help Center
Variables and constants store static values and expressions that are used in components and pages. For example, they might be used to store...
Read more >
How to use Constants and Generic Map in VHDL - VHDLwhiz
Learn how to use Constants and Generic Map to make your VHDL modules ... It allows you to make certain parts of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found