Redirect users to some page when submitting a form

When submitting a form you might want to redirect users to some page, there are few ways you can do that, they are listed below. You will put this into your submit handler function

// Redirect to an internal Drupal route.
// Or
  ['node' => $node->id()]

// Redirect to a URI, or other web address
$url = Drupal\core\Url::fromUserInput('/some_page');

// Redirect with params and options
$route_name = 'view.membership.membership';
$params = ['user' => $uid];
$options = [];
$form_state->setRedirect($route_name, $params, $options);