const Dashboard = () => ( <div> // ... <ResourceContextProvider value="posts"> <List disableSyncWithLocation> <SimpleList primaryText={record => record.title} secondaryText={record => `${record.views} views`} tertiaryText={record => new Date(record.published_at).toLocaleDateString()} /> </List> </ResourceContextProvider> <ResourceContextProvider value="comments"> <List disableSyncWithLocation> <SimpleList primaryText={record => record.title} secondaryText={record => `${record.views} views`} tertiaryText={record => new Date(record.published_at).toLocaleDateString()} /> </List> </ResourceContextProvider> </div> )
一些基本案例的使用和讲解