Creates an object with a value property which contains the current value of the specified selector.
value
selector
Return value from the selector.
Redux state definition.
Selector function either returned by createSelector or a simple state accessor.
createSelector
Additional args to pass to selector.
An object with a reactive value property that represents the return value of the specified selector.
<script> import { useSelector } from "@laserware/sword"; import { selectSomeValue } from "./my-redux-selectors"; const someValue = useSelector(selectSomeValue); function handleClick() { console.log(someValue.value); }</script><button onclick={handleClick}>Click Me</button> Copy
<script> import { useSelector } from "@laserware/sword"; import { selectSomeValue } from "./my-redux-selectors"; const someValue = useSelector(selectSomeValue); function handleClick() { console.log(someValue.value); }</script><button onclick={handleClick}>Click Me</button>
Creates an object with a
value
property which contains the current value of the specifiedselector
.