getQuerySelector(...)=>(state) expects 2 arguments
See original GitHub issuegetQuerySelector()=>() requires 2 arguments, but I think the second should be made optional. This is not a syntax error, just a linting issue. Not sure I syntaxed that explanation correctly, so here is an example.
const getStuff = getQuerySelector({ type: types.LOAD_STUFF });
const stuff = getStuff(state);
In the above example, getStuff(state)
will produce a linting error saying that the function requires 2 arguments, the second argument is expected to be props
, the same stuff that’s already been passed to the getQuerySelector
call.
Unless I misunderstand the way that the result of getQuerySelector should be used… 😃
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Use reselect selector with parameters - Stack Overflow
The input selector's second parameter is how we get it. Here's how the selector would look, const selectNumOfTodosWithIsDoneValue = createSelector( (state) => ...
Read more >Document.querySelector() - Web APIs | MDN
The Document method querySelector() returns the first Element within the document that matches the specified selector, or group of selectors ...
Read more >jQuery and Ajax Tutorial
EXAMPLE 2: Ajax Request with POST Parameters to PHP HTTP Server. In this example, we trigger an Ajax POST request to a PHP...
Read more >@testing-library/jest-dom - npm
Custom jest matchers to test the state of the DOM. Latest version: 5.16.5, ... toBeInTheDocument() expect(getByTestId(document.
Read more >API Reference | Vitest
import { describe, test } from 'vitest' // The two tests marked with ... in the test name in the order of the...
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
@zeraien above example was specific reason why
getQuerySelector
was created, to save people one arrow function 😃I will fix this issue before the next release, which should come within 1 week. Don’t be surprised though, it will actually have name change into
@redux-requests/core
and won’t depend on saga anymore. Albeit usage with sagas will still be possible.Fixed in
0.28.0
, thx for reporting this!