Unsure questions from a frontend interview
Today, I got an interview with a consulting company. Most of the problems are basic, and I met some of them I am not clear about.
Localstorage and Cookie
Usually, localstorage always come with sessionstorage and cookie. And the interviewer asked me where the localstorage is stored. I was a little bit confused and got no idea at that time. Cookie is a single string. Localstorage is saved locally as a file.
Properties of flex layout
The question I got asked is how to put an element in center place. I came up with justify-content and align-items, but I encountered some problem when tried to explain what they do. So I realized I am very clear about the properties and what they mean.
Basically, justify-content is used to justify elements based on the main axis. Align-items is used to align elements based on the cross axis, which is perpendicular to the main axis. So if our flex box is in a col way, then cross axis would be horizontal.
How redux asynchronous and what is middleware of redux
Use redux-thunk, redux-promise or redux-saga