Skip to content

[RFR] Fix missing documentation for ra-data-fakerest logging abilities - #2652

Merged
djhi merged 1 commit into
masterfrom
fake-data-provider-logging
Dec 12, 2018
Merged

djhi merged 1 commit into
masterfrom
fake-data-provider-logging

Conversation

@fzaninotto

Copy link
Copy Markdown
Member

Pass true as second argument to log the requests made to the provider in the console. This is very helpful to debug the requests made by an app using this data provider.

// in src/App.js
import React from 'react';
import { Admin, Resource } from 'react-admin';
import fakeDataProvider from 'ra-data-fakerest';

const dataProvider = fakeDataProvider({ /* data here */ }, true);

const App = () => (
    <Admin dataProvider={dataProvider}>
        // ...
    </Admin>
);

@fzaninotto fzaninotto added this to the 2.5.2 milestone Dec 12, 2018
@djhi
djhi merged commit 9533e89 into master Dec 12, 2018
@djhi
djhi deleted the fake-data-provider-logging branch December 12, 2018 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants