If you are getting “Unexpected token string...” error when adding query parameters or passing props in a widget in React instantSearch, you should check whether your values contain spaces, apostrophes or double quotes.
If it contains spaces, you can enclose the whole value in single quotes.
{ “filters”: “color:’Navy Blue’” }
or
filters={“color:’Navy Blue’”}
If the value has an apostrophe (‘), you can put two backslashes in front of apostrophes and enclose the whole value in single quotes.
{ “filters”: “type:‘women\\’s’”}
or
filters={“type:‘women\\’s’”}
If the value contains a double quote ("), you can place a single backslash before the double quote and wrap the entire value in single quotes.
{"filters"= "length:'14\"'"}