Posts

Showing posts from April 15, 2019

What is the best way to dynamically update Navigation bar and side bar in React?

What is the best way to dynamically update Navigation bar and side bar in React? I created a layout component for my react app, and I wanted to dynamically update the side bar and navigation bar on route change. I can use redux, but all of the state and methods will be available at all times, even if i don't need them. I also looked at the new react context, but it has the same problem as redux. With react router, it looks like i'm just mounting a new sidebar or navigation bar. Is there a way to dynamically provide new state and methods to my layout component? (replace the state with a different one, or multiple new once: apple --> orange) React router looks like my best option, but I can do the same thing by just including the sidebar and navigation bar with each new route. Dynamically adding links is not a problem, adding a button that affects the newly mounted component is the problem. The navigation bar and side bar lives in the parent component, so they need to k

Passport number for train reservation in Spain

Image
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0; 3 We are traveling from the US to Spain in April and we want to reserve some train tickets (the high-speed train from Madrid to Barcelona -- not crossing any borders). The online site, loco2.com, requires passport numbers for the tickets. However, my son's passport is being renewed, and we won't have his new number for another couple of weeks. If we book the ticket under his previous passport number, are there likely to be any issues? ( Edit : Going through the site again suggests that it was a misunderstanding, and they do not in fact require passports for tickets.) trains passports spain share | improve this question edited Mar 4 '16 at 12:11 iayork asked Mar 3 '16 at 12:45 iayork iayork 242 2 10 2 Seems odd that they're asking for passport numbers. It would be en