Consider splitting global variables out of config.js and making available to all views
See original GitHub issueWe’ve seen some users want to make some variables available globally to all views. At the moment this is can be cumbersome to do and confusing for people not familiar with js.
One solution would be to automatically make the contents of config.js
available to all views. It currently contains some stuff (port number) that you might not want available, so an alternate would be to split the file in to config.js
and variables.js
, and have the contents of the latter file made available to all views.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Need advise/help on getting rid of global variables
And I've put all global variables inside settings.js. Currently I use these global variables for these reasons: 1. Calculation based on some ...
Read more >Allow to share global state between tests from globalSetup
I have seen some really gross workarounds to this problem that abstract the various tests in each testfile into regular js functions, and...
Read more >3 ways webpack surprises web developers - rossta.net
For this post, we're going to look at three common surprises web developers face when learning webpack: why using global variables doesn't ...
Read more >Global Variables and States: Why So Much Hate?
Global variables are a common pitfall many developers fall into. Let's take a look why, and how we can fix this problem.
Read more >Namespacing Fundamentals - Learning JavaScript Design ...
One popular pattern for namespacing in JavaScript is opting for a single global variable as our primary object of reference. A skeleton implementation...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think maybe
config.js
anddata.js
We think this functionality is covered by the default session data - please feel free to reopen if anyone disagrees.