How do you setSettings in React

Looking to add restrictSearchableAttributes: ‘name’ to Autocomplete in my react application using algolia.
I can not find any examples of setSettings in React. Any advice as to how i should include this or if a searchable api may be the issue.

I found i was using the import algoliasearch from ‘algoliasearch/lite’; where setSettings and other features are not included. from ‘algoliasearch’ solved the error but then highlighted what i suspected a search API Key does not provide these methods.

Hey there,

Actually you should not use setSettings from your front-end because this operation requires the editSettings right. This means that anyone who get the API key will be able to mess with the configuration of your index.