question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Do we really need `isValid`?

See original GitHub issue

From 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?

@benbender.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ConsoleTVscommented, Aug 12, 2021

Isn’t isValid related to this lib?

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 😄

1reaction
ConsoleTVscommented, Aug 12, 2021

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found