Questions tagged as 'react'

2
answers

Problem with $ .getJSON.then ()

I do a data extraction with $ .getJSON () without problems, I get what I want from my database and then I work with .then but in this line getKeys().then(data => data.map(key => keys.push(key))); that I keep in my variable 'keys' whic...
asked by 15.03.2017 / 20:24
1
answer

It is safe to save a jwt token in LocalStorage

I have a react-app and I store the token jwt in localStorage. I have been researching and some recommend using sessions. My question is what risks I run. Anyone could use the token and generate calls to my Apis.     
asked by 21.03.2018 / 17:08
3
answers

Does not load the component in react. error in http: // localhost: 3000 / shows the message on the Can not GET page / when trying to load the React component

file: server.js const express = require('express'); const express = require('express'); const app = express(); const app = express(); app.use(express.static(__dirname + '/public')); app.use(express.static(__dirname + '/public...
asked by 09.08.2017 / 01:47
4
answers

How to consume an API with REACTJS?

I have an application created with reactjs which I must consume an api that returns me x data. The problem I have is that I do not know how to do it through reactjs, I've reviewed the Internet how to do it and I've replicated exactly the...
asked by 05.12.2018 / 14:13
1
answer

I can not write in an input inside a table in ReactJS

Trying to place several input within a table, I have encountered an inconvenience, which is that it does not allow me to write anything in these, no matter how much I do things. As I read in my search, it can not be placed in such a wa...
asked by 18.04.2018 / 15:57
1
answer

React, Google map: "Unexpected token" and "google is not defined" when deployed

I'm getting two errors, the first: ###Uncaught SyntaxError: Unexpected token < And the second: ###ReferenceError: google is not defined When I run it on my computer everything works but at the time of deployment in now.io e...
asked by 11.06.2018 / 08:09
1
answer

React Native [Error: Camera is not running] Is there a way to reboot the camera within a specific view?

I have a button that removes photos, works very well inside a view, you can remove several photos (The result in the console) this is the image on the cel this is the code import React, { Component } from 'react'; import { Sty...
asked by 09.06.2018 / 15:42
1
answer

help with React native: Failed building JavaScript bundle / Restarted watchman

Good afternoon, I'm starting with React native and I came out of nowhere a problem that does not let me do anything, just in the terminal every time I give reload to the application it says "Failed building JavaScript bundle" and in the next one...
asked by 14.12.2017 / 23:26
4
answers

how to copy the value of the state of a component into a variable

I have an initial state with objeto item to save the character data. equal const model = this.state.item to be able to obtain the object and make modifications but it seems to create a reference and not a copy. when I modify var...
asked by 31.05.2018 / 23:23
1
answer

Hide Tab in primereact

I have a component of primereact . <TabView > <TabPanel header="Panel 1"> </TabPanel> <TabPanel header="Panel 2"> </TabPanel> </TabView> How can I show / hide a tab according to a specifi...
asked by 11.12.2018 / 10:04