Skip to content

Customization Basics

Tim Scott edited this page Aug 27, 2017 · 4 revisions

Customize the appearance and behavior of React Devise by passing configuration settings into initReactDevise.

Configuration

initReactDevise({
  clientResourceName: 'customers',
  apiResourceName: 'api/auth',
  apiHost: 'http://auth.example.com',
  defaultViewPluginSettings: myDefaultViewPluginSettings,
  viewPlugins: myPlugins,
  messages: customMessages
});
Setting Default Value Description
clientResourceName "users" The first node in the route to each auth view.
apiResourceName "auth" The resource name used by Devise on the server. The first node in the path of API calls.
apiHost undefined Omit unless your devise API is host on a different domain than the website.
viewPlugins [] Use one or more view plugins to inject custom components into React Devise views. [More]
defaultViewPluginSettings {} To customize the default plugin, provide a settings object. This can be used in conjunction with custom plugins or without them. [More]
messages {} Override the default messages used by React Devise. Default messages are here.

NEXT: Customizing Routes >

Clone this wiki locally