Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Website: New page to present tech stack #976
base: main
Are you sure you want to change the base?
Website: New page to present tech stack #976
Changes from all commits
46220d3
cd066b7
f0abc70
758f7b6
a872130
d2c7e3f
eaf5f87
6312441
3db2d98
cd6a1bd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any particular reason you are making this a client-side component?
I think we can instead make
techcard.tsx
into a client-side component and store it in a separate folder(components)
instead of(sections)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I encountered issues with client/server components and async/await when adding the tabs. I was able to fix it by adding
'use client'
(and replacingTranslator.getInstance
withuseTranslator
), but I don't know React well enough to tell if this is the correct fix. I saw that'use client'
is used quite often throughout the code and it seems to do the trick.When turning
techcard.tsx
into a client-side component, I think (again, limited React knowledge on my side) I would also need to do the same withtechlist.tsx
because I am usinguseState
to keep track of the tab state to filter the list anduseState
only works for client components, correct?Should I still try to refactor both files into components? And to improve my understanding of React, what are the reasons for not using
'use client'
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lvonlanthen, I completely relate with you. Even I had some difficulty in understanding the difference between client-side and server-side components. Michael had shared a link with me which really helped me clarify my doubts. I shall do the same: NextJS Components.
The main idea here is: Instead of sending the entire component over from the server, just send the data and load the component using browser's resources (i.e. client-side). It is just a good way to reduce server load
That is why I believe that techcard can be a client-side component and techlist can do the data fetching part.
Let me also share one of the pages I worked on recently for you to understand the implementation there.
Here's the server-side component: Section-1 Cards List
and here's the client-side component: Section Card
You can also go through other sections (2 and 3) and the web page so that the point becomes crystal clear.
Finally, feel free to ping me on Slack as well if you would like more discussion around this. Always happy to help 😊.