Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combineSlices implementation #3297

Merged
merged 55 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
3c3bc4d
experiment with API typing
EskiMojo14 Mar 26, 2023
a50c968
support reducer map objects
EskiMojo14 Mar 26, 2023
00762a2
Prevent undeclared keys in reducer maps
EskiMojo14 Mar 26, 2023
5b81a3a
basic implementation
EskiMojo14 Mar 26, 2023
1397a52
export from entry point
EskiMojo14 Mar 26, 2023
075811e
rm inline typetest
EskiMojo14 Mar 26, 2023
99945eb
throw dev error if new reducer is injected when one already exists (w…
EskiMojo14 Mar 26, 2023
60d403b
typetest
EskiMojo14 Mar 26, 2023
7b4d8e0
more typetests
EskiMojo14 Mar 26, 2023
b3d4164
implement suggestions
EskiMojo14 Mar 26, 2023
818c595
add tests and fix oversight in injectSlices
EskiMojo14 Mar 26, 2023
6f1cbdf
use a Proxy to ensure injected reducers have state in selector
EskiMojo14 Mar 27, 2023
42db406
test result of selector instead of inside selector
EskiMojo14 Mar 27, 2023
b5db06a
syntax
EskiMojo14 Mar 27, 2023
8d5c282
add selectState parameter to handle nested reducers
Mar 27, 2023
b743008
use type assertion instead of ts-ignore
Mar 27, 2023
8ad0eb5
some JSDoc
Mar 27, 2023
a918ebd
handle RTKQ instances
Mar 27, 2023
bfdb10f
define original once and just attach to selector
Mar 27, 2023
8fc0d5d
throw an error when reducer returns undefined when called in state proxy
Mar 27, 2023
0c0d116
cache proxy creation, and use a proxy to mark a reducer as replaceable
EskiMojo14 Mar 27, 2023
327577f
export markReplaceable from package
EskiMojo14 Mar 27, 2023
43eb309
only allow injection of one slice/api at a time, and add config to al…
Mar 28, 2023
891a9f0
rename StaticState to InitialState, now it can be injected into
Mar 28, 2023
7058b93
injectSlice -> inject, Slice -> SliceLike, Api -> ApiLike, allowRepla…
Mar 28, 2023
cdb1e00
match RTKQ overrideExisting behaviour
Mar 28, 2023
7cdaf5b
fix test to match new behaviour
Mar 28, 2023
bac5361
remove unused export
Mar 28, 2023
7d7616c
no longer require slice to be declared before injection
Apr 2, 2023
157b88a
rework selector inference
Apr 2, 2023
1a218cf
check reducer matches
Apr 2, 2023
bd5d4ff
begin experimenting with slice selectors
Apr 6, 2023
c36c9dc
tests
Apr 6, 2023
d1ae818
default to ID function for getSelectors without selectState
Apr 6, 2023
deecec7
cache selectors
Apr 6, 2023
2731434
rm TODO
Apr 6, 2023
792c944
injectInto implementation
Apr 6, 2023
36503dc
more accurate typing
Apr 6, 2023
4e4a3a1
pass arguments through
Apr 6, 2023
32d1964
more tests
Apr 6, 2023
34bf78b
remove index signature from selectors generic
Apr 6, 2023
bccf47f
Merge pull request #1 from EskiMojo14/combine-slices-integrated
EskiMojo14 Apr 6, 2023
6816c1a
remove constraint on lazy
Apr 7, 2023
d59b26a
add optional name parameter for injectInto
Apr 7, 2023
a285bf8
adjust slice option
Apr 7, 2023
af875ae
add inject config to injectInto
Apr 7, 2023
e3e8c2d
JSDoc
Apr 7, 2023
ef07e12
custom name test
Apr 7, 2023
37ab272
add reducerPath option to slice
Apr 7, 2023
e92c7db
fix tests
Apr 7, 2023
737d5cc
simplify injectInto implementation
Apr 7, 2023
e52f609
throw if selectState returns undefined in an uninjected slice
Apr 7, 2023
0a23a5c
rm WithApi export
Apr 7, 2023
fbf8c24
don't throw error in production
Apr 8, 2023
8b2c55d
delete injectableCombineReducers.example.ts
Apr 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading