Do we really need `isValid`?
See original GitHub issueFrom vswr code:
// Determines if the data is valid. This means that
// there is no error associated with the data.
// This exists because errors do not wipe the data value
// and can still be used.
const isValid = computed(() => data.value !== undefined && error.value === undefined)
Do we really need this?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Is Valid - Wiki
The isValid() method has no arguments and that returns a boolean indicating if the receiver has a) been fully instantiated and is a...
Read more >How does Page.IsValid work? - asp.net - Stack Overflow
You only need to check Page.IsValid if you you only want to perform action on a valid page. There are very real use...
Read more >ASP.NET Core – Checking ModelState.IsValid is boring
Checking if a model is valid is pretty an automatic behavior at this point. Whenever a request expects a model, we need to...
Read more >How to verify that strings are in valid email format
Read an example of how a regular expression verifies that strings are in a valid email format in .NET.
Read more >IsValid - Adobe Support
The IsValid function lets you assure that validation is performed on the server. You can use the cfparam tag to perform equivalent validation....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Those exists to make your life easier, you don’t really need to use them, they are just computed properties that basically determine certain situation. As noted by ben, swrev don’t have an explicit internal state so I can’t expose it. Of course you can use both data and error to determine exactly the same, but some people prefer having some handy methods like those, and they are really one liners for me to write 😄
swrev dont have s state per se, we determine state based on data and error. We could improve this in the future.
As mentioned, please open issues for stuff that is related to this lib, internal discussions can be done in other private channels!