I couldn’t go to bed on Monday without trying to solve some of the problems I had left myself for Tuesday. Knowing that my site was live, but that one of my apps was showing only a blank page on Safari and Chrome was too frustrating to ignore.
I did some Googling and found a solution in the Q&A section of a Udemy course I took. I implemented that, and the Client Panel showed a login page. Since I hope to show this to future employers who don’t have login credentials, what I needed to show was the register page.
I went back into the code, looked at the default settings in my store.js file, and set allowRegistration to true. I rebuilt and redeployed, but it was still showing Login, with no option to register in the navigation bar. I decided to log in. From there, I went into the settings, changed Allow Registration with the checkbox, logged back out, and then Register became an option in the navbar.
I tried this on Chrome on my phone, but the hamburger drop-down menu wouldn’t open to show either login or register as options. It just sat there. So I shrank my browser window on my computer to match the width of a phone screen, but there the hamburger menu worked. I’m still not sure why. Also, I didn’t know how long the data would persist that changed the registration option.
The next morning, Register was still an option. I asked my wife to try the Client Panel on her phone, and she showed me that the drop-down menu showed both options there. I asked a few friends, and it worked on their phones as well, so I guess I just won’t mess with it!
Yesterday, I spent some time reviewing ES6 on freeCodeCamp.org. I had completed that section months ago, but now that I’m feeling good about using React, I wanted to get that practice back, because using spread operators and destructuring outside of tutorials was giving me some issues. I finished that section feeling a lot better about ES6. Finally. The first time I tried to learn React, I didn’t know ES6 at all, and looking at the almost completely foreign syntax really screwed me up.
Next, I’m working on building a social media site in the MERN stack. I set up mLab and installed some dependencies, including some that I’ve used before, like body-parser, passport, and mongoose, as well as nodemon (is it “no demon” or “node mon”?) as a dev dependency, and also installed some that I’m unfamiliar with at this point, including jsonwebtoken, bcryptjs, and validator. I’ll be cruising those docs now to see what I can do with them.