Ay
@Aycom366All comments
- @NinjaInShade@Aycom366
I haven't really check your solution but ur question caught me
Asking if data is from API blablabla.... You can choose to always fetch at every request and you can choose to fetch it once and stores the data in redux or context
All these depends on the framework and packages your using
In react, I could decide I don't wanna use any context or redux to store data because I wanna use the react query package
The react query caches data, you should read more on it
Same thing with nextjs, with getserversideprops.this also caches data
And if you are not using any of these, you might consider using a global store because All request will go straight to the server to fetch data, there is no caching of data in this case. So it necessary to get data from ur store (redux, context)
Any one can adds to this as well, I might have missed some things
- @exist08@Aycom366
Hi Anurag, have not checked your code or how you set everything up but checking your solutions I observed some things.
- I noticed your flags do not have the same height, you can make a container and inside the container, you add the image tag inside. I.e <div> <img style={object-fit:cover,width:100%,height:100%}/> </div>
after setting up the image, you can adjust the image based on the height of the container. you can set explicit height or max height on the container. so the image would have no option but to take up the whole container space. I don't know if you understand this?? 2. The shadow used in this project is way too much, it just too much. 3. learn to use the max-width property to set the maximum width your app should be
Marked as helpful - @JamesTheLessFC@Aycom366
Hi James nice job with the project concerning the issues of different flag sizes. most times I normally wrap my image inside a container and give that container explicit height or width or even max-width which is recommended. then I set the image object-fit property to cover, width and height to 100%. following this method will always make the image fill the container no matter how big the image is.
Marked as helpful - @heritio@Aycom366
I dont really know because I myself haven't used Redux atall, but I see tutorials and I see how it been used for projects. have not really seen people using redux with a functional components but instead they will use redux with a class based components and I myself dont like the habit of using class for my projects. I prefer something simpler like the functional component and using react hooks. it more simpler to learn react hooks to redux check coding addict on youtube. he quite a lot of basic projects with React and I think he used the useReducer once
Marked as helpful - @heritio@Aycom366
hi akilimali, have not checked through your project tho. but am just going to talk about the use of redux or useContext. I believe youve either once use class javscript. if you like the idea of using class for projects, you can learn redux but i prefer useContext and useReducer to using Redux. people still uses redux but I feel people should upgrade to react hooks
Marked as helpful - @Agustinn-1002@Aycom366
This website is not responsive on mobile atall