Skip to content
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

Discuss how to use ?. (js optional chaining operator) #258

Open
plocket opened this issue Oct 2, 2024 · 2 comments
Open

Discuss how to use ?. (js optional chaining operator) #258

plocket opened this issue Oct 2, 2024 · 2 comments
Labels
heat-app-js Issues related to the HEAT app frontend

Comments

@plocket
Copy link
Collaborator

plocket commented Oct 2, 2024

          Future issues:
  1. Remove ?. optional chaining operator from user_data
  2. How do we want to handle ?. optional chaining operators in general? They indicate that something is not as expected, which will have consequences somewhere in the code. Those cases should be handled.

Originally posted by @plocket in #255 (comment)

@thiagobardini
Copy link
Member

The solution to this problem is to use Zod validation, as shown in the link below. We already have the validation in place, we just need to adjust it, which is why we're seeing conflicts.

Posted comment by @thiagobardini in #255 (comment)

@plocket
Copy link
Collaborator Author

plocket commented Oct 22, 2024

From #255 (comment)

Briefly talked about tradeoffs of using optional in meeting, esp mentioning required form fields being driven by Zod. To me that means if we take the .optional() approach, we may need multiple zod objects for the same piece. Let's cover this in #258

From now, let's keep this convo in here

@ethanstrominger ethanstrominger added the heat-app-js Issues related to the HEAT app frontend label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
heat-app-js Issues related to the HEAT app frontend
Projects
None yet
Development

No branches or pull requests

3 participants