Jeg har laget en liten web app jeg har kalt Smileyhash som jeg nå skal ta videre til en Progressive Web App. Jeg har allerede en free tier på Amazon og nå har jeg kjøpt domenet twsmiley.com. Planen er at jeg skal lansere hashtaggen #twsmiley(0-10) istedet for å bruke #smiley(0-10) og at løsningen skal være en hundre prosent fullverdig progressiv web app.
Jeg har funnet en tutorial for å skrive en Progressive Web App med next.js og sitter nå med et lukket git repo jeg har en remote på hos bitbucket. Jeg har en todoliste og satser på å sitte så mye som mulig fremover, selv om energinivået går litt opp og ned.
I am attending quite a few job interviews these day and we sometimes we discuss React and Redux.
I was presented with the idea of using Redux «all over». To me that sounds like you have no attributes in your components and connect to redux in every component all over your solution.
This is not the way to go. Creating components that takes attributes is the core to Web Components. It is based on the mindset of all of the web and the work of WHATVG and html standard. It makes your component readable and reusable.
You don’t want to connect to Redux store in all of your components. Connect in the container and propagate to your components using props.
An example I discussed in an interview today was a todolist.
See code below…
EDIT: The pastebin is incomplete and one problem in the code is the iteration sequence – the number in row of todolistitems needs to be propagated in my anti-pattern.
The point is – any kind of component that takes data should receive them as attributes/properties. I was just introduced to the idea of using Redux «everywhere» in an interview and my point is that you do not have to connect every component to redux. This will even make your code slower (perhaps) – you iterate over the array and you do not access the values in the loop.
This is really sigletonitis all over again – as a disease where you over-use a pattern. Just on Redux or whatever datastore you might implement.