FormidableLabs / redux-little-router

A tiny router for Redux that lets the URL do the talking.
MIT License
1.04k stars 114 forks source link

Added a merge query option #158

Closed amadt closed 7 years ago

amadt commented 7 years ago

Originally, this is how I assumed persistQuery worked. Let's say my current url is:

http://www.abc.com?search=abc&filter=new

If I call

push(
    { query: { search: 'xyz' } }, { mergeQuery: true }
)

my url becomes:

http://www.abc.com?search=xyz&filter=new

This is nice because it allows my component to only have to have knowledge of the query parameter he's interested in.

codecov-io commented 7 years ago

Codecov Report

Merging #158 into master will decrease coverage by 0.41%. The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #158      +/-   ##
==========================================
- Coverage   99.55%   99.14%   -0.42%     
==========================================
  Files          20       20              
  Lines         227      233       +6     
==========================================
+ Hits          226      231       +5     
- Misses          1        2       +1
Impacted Files Coverage Δ
src/reducer.js 96.55% <83.33%> (-3.45%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2f6beea...a8e2f60. Read the comment docs.