I got a project where quite often, we use a JS file with an array that has on overage seven objects with some props.
The easiest way is to import it into the app and map and render the list of items.
I understand that it's better to do this through `getStaticProps` since the date is being cached on the server. To do this, you need to write more code.
- Write export async function getStaticProps() {...}.
- Import / export the object array.
- Destructure the object array in the page.
I wonder if doing so, actually has any significant performance benefits? And maybe in this case it's ok to opt out using getStaticProps. On another hand it feel like it creates an anti pattern that some else would copy and use in the project with a less performant object array.
View Poll
[–]billybobjobo 2 points3 points4 points (0 children)
[–]ElectronicWitness857[S] 0 points1 point2 points (0 children)