( resource: Resource, propertyURL: string, opts?: useValueOptions, )
| 409 | |
| 410 | /** Returns false if there is no value for this propertyURL. See {@link useValue} */ |
| 411 | export function useBoolean( |
| 412 | resource: Resource, |
| 413 | propertyURL: string, |
| 414 | opts?: useValueOptions, |
| 415 | ): [boolean | null, setValue] { |
| 416 | const [value, set] = useValue(resource, propertyURL, opts); |
| 417 | if (value == null) { |
| 418 | return [false, set]; |
| 419 | } |
| 420 | return [valToBoolean(value), set]; |
| 421 | } |
| 422 | |
| 423 | /** |
| 424 | * Hook for getting a stringified representation of an Atom in a React |
no test coverage detected