I have an application for iPhone with three categories and each category shows a list of stores. I have defined each list of stores in a .js file. Files are called shops.js, food.js and art.js. Then I have three buttons that when pressed, load each of the .js files using require(). My problem is that if for example I press the shops button, it calls require('shops') and load it, but when I press the button of food and calls require('food') overlaids the food view on the shops view. My question is if I could remove one require before loading another one.
↧