How to use the use-query-params.withQueryParams function in use-query-params

To help you get started, we’ve selected a few use-query-params examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github linkerd / linkerd2 / web / app / js / components / Tap.jsx View on Github external
}

Tap.propTypes = {
  api: PropTypes.shape({
    PrefixedLink: PropTypes.func.isRequired,
  }).isRequired,
  autostart: PropTypes.string,
  isPageVisible: PropTypes.bool.isRequired,
  pathPrefix: PropTypes.string.isRequired,
};

Tap.defaultProps = {
  autostart: '',
};

export default withPageVisibility(withQueryParams(urlPropsQueryConfig, withContext(Tap)));
github linkerd / linkerd2 / web / app / js / components / TopRoutes.jsx View on Github external
);
  }
}

TopRoutes.propTypes = {
  api: PropTypes.shape({
    PrefixedLink: PropTypes.func.isRequired,
  }).isRequired,
  isPageVisible: PropTypes.bool.isRequired,
  query: topRoutesQueryPropType.isRequired,
  setQuery: PropTypes.func.isRequired,
};

export default withPageVisibility(withQueryParams(topRoutesQueryConfig, (withContext(withStyles(styles, { withTheme: true })(TopRoutes)))));
github pbeshai / use-query-params / examples / react-router / src / ReadmeExample3.tsx View on Github external
<h1>There are {filters.length} filters active.</h1>
      <button>
          setQuery(
            { x: Math.random(), filters: [...filters, 'foo'], q: 'bar' },
            'push'
          )
        }
      &gt;
        Change All
      </button>
    
  );
};

export default withQueryParams(
  {
    x: NumberParam,
    q: StringParam,
    filters: ArrayParam,
  },
  UseQueryParamsExample
);
github linkerd / linkerd2 / web / app / js / components / TapQueryForm.jsx View on Github external
handleTapStop: PropTypes.func.isRequired,
  query: tapQueryPropType.isRequired,
  resourcesByNs: PropTypes.shape({}).isRequired,
  setQuery: PropTypes.func.isRequired,
  tapIsClosing: PropTypes.bool,
  tapRequestInProgress: PropTypes.bool.isRequired,
  updateQuery: PropTypes.func.isRequired,
};

TapQueryForm.defaultProps = {
  enableAdvancedForm: true,
  handleTapClear: _noop,
  tapIsClosing: false,
};

export default withQueryParams(urlPropsQueryConfig, withStyles(styles)(TapQueryForm));
github pbeshai / use-query-params / examples / react-router / src / WithQueryParamsExample.tsx View on Github external
'push'
                    )
                  }
                &gt;
                  Change Push
                
              
            
          
        
      
    
  );
};

export default withQueryParams(queryConfig, WithQueryParamsExample);