Skip to content

Commit

Permalink
Merge pull request #4022 from christiaanwesterbeek/patch-2
Browse files Browse the repository at this point in the history
Upgrade > Login uses children instead of a loginForm prop
  • Loading branch information
fzaninotto authored Nov 22, 2019
2 parents ad077cf + 52a07d5 commit 6297ef1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,23 @@ If you had custom reducer or sagas based on these actions, they will no longer w

**Tip**: If you need to clear the Redux state, you can dispatch the `CLEAR_STATE` action.

## Login uses children instead of a loginForm prop

If you were using `Login` with a custom login form, you now need to pass that as a child instead of a prop of `Login`.

```diff
import { Login } from 'react-admin';
const LoginPage = () => (
<Login
- loginForm={<LoginForm />}
backgroundImage={backgroundImage}
- />
+ >
+ <LoginForm />
+ </Login>
);
```

## i18nProvider Signature Changed

The react-admin translation (i18n) layer lets developers provide translations for UI and content, based on Airbnb's [Polyglot](https://airbnb.io/polyglot.js/) library. The `i18nProvider`, which contains that translation logic, used to be a function. It must now be an object exposing three methods: `translate`, `changeLocale` and `getLocale`.
Expand Down

0 comments on commit 6297ef1

Please sign in to comment.