Now besides these different imports and exports and taxes which are good to know there is one other
thing which you have to understand and know in Project state we're not just exporting a class or an
interface as we're doing it in all the other faults but we're actually exporting a constant project
state.
Now the thing is we're importing this constant in multiple our files.
We're importing it in the project list.
TSA file overalls importing it and the project input t file.
So we import from the same file multiple times.
The question is does this code in this file namely the creation of this constant here.
Does this run once or twice or how often does it run once per import statement or once for the entire
app.
Well turns out it runs once when the file is imported for the first time by any other file.
If a number of file then imports that same file again it does not run again.
We can all to validate this by adding a console log statement here running we'll see this only will
get printed ones.
Even though we're importing project status both here and the project list.
Yes file and then the project input yes file still.
This will only be printed to the console once you see it here running.
It will never be printed a second time no matter what we do.
So this only runs once.
This is how it behaves and this is just something you have to know.
So you can plan your app appropriately.