Q:

React JSON - Display data in a Card Slider

I have a local JSON file which I've converted to Javascript.  
I am able to fetch the data by importing the JS file into my App.js.  
This is my App.js file: 
import React, { Component } from "react";
import CardData from "./data/db";
import "./App.css";

class App extends Component {
  constructor() {
    super();
    this.state = {
      CardData
    };
  }

  render() {
    return (
      <div>
        {this.state. CardData.map(cards => (
          <div className="card">
            <span>{cards.title}</span>
            <br />
            <span>{cards.subtitle}</span>
            <br />
          </div>
        ))}
      </div>
    );
  }
}

export default App;

I want to be able to show 3 Cards, and then have the option to slide across to the remaining cards. 
Something like this

However I am only able to show it in one div, is there a way to do it in the way I've called the JSON or is there a way to separate the JSON data by their ID?  

A:

Since you are looking for a simpler way to achieve the same result I would suggest switching your App to a stateless component, as it is never updating/using any state value :
import React from "react";
import CardData from "./data/db";
import "./App.css";

const App = props => (
    <React. Fragment> //A fragment will not appear in your DOM
        {CardData.map(({ title, subtitle }, index) => ( //Deconstructs each cards
            <div className="card" key={index}>
                <span>{title}</span>
                <br />
                <span>{subtitle}</span>
                <br />
            </div>
        ))}
    </React. Fragment>
)

export default App;

But this component will never be able to render anything else than this specific JSON file, if you want it to be more generic, you should send your data via the component's props :
import React from "react";
import "./App.css";

const App = ({ cards }) => (
    <React. Fragment>
        {cards.map(({ title, subtitle }, index) => (
            <div className="card" key={index}>
                <span>{title}</span>
                <br />
                <span>{subtitle}</span>
                <br />
            </div>
        ))}
    </React. Fragment>
)

export default App;

And in your parent component :
import CardData from "./data/db";

const Parent = props => <App cards={CardData}/>

You should also not forget about keys when mapping elements, as every mapped component should have a unique and persistent key.