I was wrong! In my previous blog I discussed how to change same site cookie attributes, but my syntax was incorrect. This is a simple mistake that went over my head and caused many issues with my code. Previously, the code I used was written in Javascript inside a rails document. This is such a silly mistake, but with flipping between the languages, it was a mistake bound to occur and learn from.
With the chrome browser, unless specified, cookies are treated as “lax”; this means that cookies will be allowed if they are from the same site. However, for those who use React as their frontend and Rails as their backend, this causes an issue as the backend server operates at a different domain. Thus, chrome will not allow cookies to come from the backend server to the operational frontend. Thus, one must explicitly state that the samesite cookie is set to ‘none’. This will allow the cookie to be sent to a site with a different domain.
No matter how functional and amazing a project is, nobody will care if it doesn’t look good. As I learned to code, I was very focused on function and I settled for the simplest styling. Most of my styling was limited to centering everything and changing the background color. My thought process was that there are templates that could handle all the styling I need. However, to call myself a “fullstack” developer, I better be able to display frontend skills. Oh wait, because I neglected styling so long, I found that styling is not as easy as I thought. I also found that even centering things is slightly more complicated than I assumed.
You have built out your website, pushed it to GIthub and now you are ready to deploy. After doing some research and find that Netlify is the easiest and best way to deploy your site. Here are the steps to do so and a quick fix on a possible issue you may face.
In an earlier blog I discussed how to add an image to a react project. Now, here is a quick tid bit on how to make an image a link. This can be useful for portfolio projects or linking social media to a website.