IF we consider this example, https://stackblitz.com/edit/react-ts-tg5cvq , I have defined a header
variable and displaying it in between the divs as can be shown in the example.
However, let’s say if I want to define this const in firstTab.tsx
instead of defining it inside index.tsx
as shown in the example below:
https://stackblitz.com/edit/react-ts-e8a48y
Line #31 is where in firstTab.tsx
, I have defined the constant. And I want to retrieve it in index.tsx
so that it doesn’t throws an error on line 111 in index.tsx
as it’s showing right now.
how should I go about doing it?