Thank you for asking a question! Use the sections below to submit a question ONLY if it's related to samples in this repo. If you have an issue or question about the SharePoint Framework or its documentation, please submit it at https://aka.ms/spdev-issues
DELETE EVERYTHING ABOVE AFTER READING - THANKS!
https://github.com/pnp/sp-dev-fx-webparts/tree/master/samples/react-accordion
@gautamdsheth - React Accordion from Rapid Circle
The react Accordion FAQ renders perfectly the way it is supposed to display the default List view of the FAQ List entries. My question is around displaying the list entries based on the created date, no matter I change the default list view to sort the list items by created date, the web part displays only the faq entries by the default SharePoint list ID. What is the code change to display the FAQ by the most recent ones?

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Hi @Abiman194
You have to add the order by in the Rest API line number 69:
//instead of this url
let restAPI = this.props.siteUrl + `/_api/web/Lists/GetByTitle('${this.props.listName}')/items?$select=Title,Description`;
//add the order by to sort based on created
let restAPI = this.props.siteUrl + `/_api/web/Lists/GetByTitle('${this.props.listName}')/items?$select=Title,Description&$orderby=Created desc`;

Hi @Abiman194 ,
Hi @Abiman194
You have to add the order by in the Rest API line number 69:
//instead of this url let restAPI = this.props.siteUrl + `/_api/web/Lists/GetByTitle('${this.props.listName}')/items?$select=Title,Description`; //add the order by to sort based on created let restAPI = this.props.siteUrl + `/_api/web/Lists/GetByTitle('${this.props.listName}')/items?$select=Title,Description&$orderby=Created desc`;
Hi @Abiman194 , if this comment has helped you to solve your issue, please make the issue as resolved/closed. :)
Resolved. Thank you
Most helpful comment
Hi @Abiman194
You have to add the order by in the Rest API line number 69: