Posts by João Vertelo • 86 points
6 posts
-
1
votes1
answer721
viewsA: How to pass data from a table to a PDF report using React and JSPDF?
Use the jsPDf-Autotable library. Simply retrieve your html table and move to the library and it will export the pdf file from your table. var doc = new jsPDF('p', 'pt'); var elem =…
-
0
votes3
answers2202
viewsA: Test an App on android. React Native
You can use the Expo as already mentioned there or debug directly on your mobile via usb. Just enable your mobile to debug in the developer options.
-
1
votes1
answer914
viewsA: How can I get the JWT token after authenticating?
To add to localStorage just use setItem(KEY, VALUE). I don’t know what structure of your Sponse, but it would look something like this: localStorage.setItem(ACCESS_TOKEN, response.value.jwt);…
-
2
votes2
answers489
viewsA: Problem with parole in React
You cannot Co-link IF’s within the scope of the return. If you want to make the logic inside the Return you have to use the ternary condition. ex: render() { const {display} = this.state; return…
-
1
votes1
answer1081
viewsA: How to wait for a method to end in JS?
Javascript is asynchronous. To make your method synchronous you have to use async/await. See the example async function getUserFullData(){ var userData = await getUser(); var userAddress = await…
-
2
votes2
answers113
viewsA: Does the component import order interfere with performance?
In React it makes no difference the import order. There is an extension in Vscode called "Import Cost" that shows the weight(size) that has its import, so you can analyze whether you should import…