Questions tagged [2d-context-api]
22 questions
0
votes
1 answer
Why variable value inside of canvas function not incrementing?
Here is an open GitHub issue Github Issue
Here is a Expo Snack
For some reason, variables are not incrementing inside the canvas function while outside works just fine. Please have a look at my code:
function home ({ navigation }) {
const [counter,…

Audrius
- 33
- 2
- 8
0
votes
1 answer
Why using value for input in react
setName({firstName : e.target.value})} />
Even if we remove the value and use this code:
setName({firstName : e.target.value})} />
The app still works. What is the difference?…

Kajayr
- 23
- 5
0
votes
2 answers
can't implement the dashboard updation in reactjs without reloading the page
i am building an Management app where one is assignee and other is user ( complainer, who makes complaint ). Both assignee and complainer have their own dashboards. i want to implement that when complainer makes new complaint, it will be displayed…

Makki Anjum
- 138
- 3
- 10
0
votes
0 answers
Context api with nested component
I want to implement context API for transmitting a value in my files.
I have the following folder structure
Screen
|-------Search Component
|-------Container Component
If I set up the context API provider in my Search can I "consume" it in…

Tanu
- 1,286
- 4
- 16
- 35
0
votes
1 answer
the fillStyle of canvas is not working
i have a function that has a loop. in the loop it creates a canvas and sets the opacity.
Then it sets the background color and converts the canvas to an image.
Somehow the Opacity is being set on the canvas but the background color doesn't get set.…
user6716232
0
votes
1 answer
How do I resize a path already closed on an HTML5 canvas?
I have a quadratic curve rendered on a canvas. I want to animate it by means of window.setInterval and changing it's dimensions (note not simply changing it's scale) thereafter.
How do I retain an editable reference to the path after calling…

user1561108
- 2,666
- 9
- 44
- 69
-1
votes
1 answer
I'm trying to use context api but the value of my Consumer return undefined in the console
This is the code for my context api
import React, { Component } from "react";
const { Provider, Consumer } = React.createContext();
const MyContextProvider = Provider;
const MyContextConsumer = Consumer;
export { MyContextConsumer, MyContextProvider…

Mnguyen
- 3
- 4