re: React Beginner Question Thread ⚛ VIEW POST

FULL DISCUSSION
 

What is need install in react project when I wish work with bootstrap? Do you have some example of this? I am try install some like react-bootstrap, reactstrap and another what you can see in my json file
{
"name": "sajtt",
"version": "0.1.0",
"private": true,
"dependencies": {
"jquery": "3.2.1",
"react": "16.2.0",
"react-dom": "16.2.0",
"react-scripts": "1.0.17",
"react-transition-group": "2.2.1",
"reactstrap": "4.8.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"devDependencies": {
"bootstrap": "3.3.7",
"bootstrap-router": "0.1.1-a",
"react-bootstrap": "0.31.5"
}
}
but I can't started use jquery. Way? Example for using image in project I must write img src={require{'imgpath/imgsrc.jpg}}. Where I make error? May be is need webpack, or babel? I wish make app for building web site singe page and multi page.
Regard
Mr.Trajanovic

 

Sorry, I don't understand what you're asking.

 

another quest is how I can use one of all data of data.json file by field Id in this file. const some=[{ "id": 0, "name": "name one"},{ "id": 1, "name": "name 1"},{ "id": 2, "name": "name 2"},{ "id": 3, "name": "name 3"}];
If I use map method react rendered all data of file. How I can get only example data where is "id": 3? I am try use


    {
    data.map((film,i)=>{
    if(i===3) {
    return (


    {film.id} ----
    {film.title}



    );

    }

    })

    }



and getwarning Expected to return a value at the end of arrow function array-callback-return.

How make that? to be glad if you have some sample

reagrad

Miodrag Trajanovic

trajanovicmiodrag@yahoo.com
 

I am find solution for this problem, but thanks to all

code of conduct - report abuse