You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This components makes queries for user data. With the API system, this will make a GET request to get user data. In order to get their team, an additional GET request will be made to get the team by user.
The component itself will have a QueryRenderer, but as we are using the API, that is not necessary. The only parts of the component needed should be within the innermost return. The props in the component relate to the graphQL query, and so their values will have to be adjusted depending on how you decide to store the data received from the GET requests.
Unlike the graphQL queries, these functions should be within the class.
This component should also be converted to a functional component as React seems to favor them. Here are some links that describe the differences between the two how to go about converting them.
If you want internal references, the Prizes and Ballot(timber) repos use functional components on their client end.
If you'd like to convert a component to typescript, you may, but that may require features that the current repo is too outdated for. I am currently working on updating it so that you may use the necessary features to maintain typing and the like.
The text was updated successfully, but these errors were encountered:
This components makes queries for user data. With the API system, this will make a GET request to get user data. In order to get their team, an additional GET request will be made to get the team by user.
The component itself will have a QueryRenderer, but as we are using the API, that is not necessary. The only parts of the component needed should be within the innermost
return
. The props in the component relate to the graphQL query, and so their values will have to be adjusted depending on how you decide to store the data received from the GET requests.Unlike the graphQL queries, these functions should be within the class.
This component should also be converted to a functional component as React seems to favor them. Here are some links that describe the differences between the two how to go about converting them.
https://nimblewebdeveloper.com/blog/convert-react-class-to-function-component
https://egghead.io/lessons/react-migrate-a-react-class-component-to-a-function-component
If you want internal references, the Prizes and Ballot(timber) repos use functional components on their client end.
If you'd like to convert a component to typescript, you may, but that may require features that the current repo is too outdated for. I am currently working on updating it so that you may use the necessary features to maintain typing and the like.
The text was updated successfully, but these errors were encountered: