How to get query params in route

Trying to create a custom route and want to get the query param memberid but can’t figure out how to access params from current request. Route looks like this in config.php.

'routes' => [
          'pattern' => '/member-basic-info',
          'action'  => function () {
               return "<h3>Member info here...</h3>Your member ship is "; 

You can get a query param with get(), e.g. get('q') or a parameter like tag:sometagwith param('tag').