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

Values for NavigationParams are defined as strings (is it on purpose?) #252

Closed
juhasuni opened this issue Feb 9, 2017 · 1 comment
Closed

Comments

@juhasuni
Copy link

juhasuni commented Feb 9, 2017

TypeDefinition.js defines NavigationParams as a map where each value (parameter) must be a string.

export type NavigationParams = { [key: string]: string, };

Yet, in the same file there's a documented example, where the value is an int.

/**
   * Params passed to this route when navigating to it,
   * e.g. `{ car_id: 123 }` in a route that displays a car.
*/

To me it looks like NavigationParams type definition is wrong, but I couldn't be sure, since you may have thought about URL routing, where each parameter must be string.

@grabbou
Copy link

grabbou commented Apr 26, 2017

To me, the type could be:

export type NavigationParams = {
  [key: string]: mixed,
};

Let's send a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants