Most voted "context" questions
10 questions
Sort by count of
-
20
votes1
answer3182
viewsWhat is and how does context (this) work in Javascript?
Essential part of Javascript, every function has context (this). How it works, how to manipulate it and what changes in strictly speaking ('use strict')?…
-
3
votes1
answer36
viewsThis parameter outside of expected inside an anonymous function
I made a code to train handling Arrays and Javascript. This is part of the code: function Playlist (nome ='Playlist'){ const musicas = []; function addMusicas(...novasMusicas){…
-
3
votes1
answer291
viewsWhat’s the Context class for?
I am developing a system in ASP.NET MVC with mapping using the Entity Framework, when observing some patterns I see a lot the use of the class Context, what it’s for and what it should contain…
-
1
votes3
answers206
viewsContext in services and repositories
In the company we work, we use Asp.net mvc divided into 2 projects: web - (groundwork) service - (business rules) In several places I have noticed other programmers using the direct context (that…
-
1
votes1
answer29
viewsDifficulty with Context API [REACT]
I need a timer component to be reflected in another distant component. To do so, I created a context to save the timers states created, since the later timer (depends on the user’s action) should…
-
0
votes1
answer45
viewsWindows Send To Menu by sending File Path
I am Developing an Application and my idea is to put this application from the send to Windows menu. I already managed to put the start of the Application there, but I can’t get the file path.…
-
0
votes1
answer2051
viewsDifference and good practices, either global or React Native context
I’m new to React Native and would like to understand in an objective way: What’s the difference between using global.variavel = foo; or create a context api? 'React recently implemented Context Api…
-
0
votes0
answers16
viewsHow to make a Dispatch with the variable type in React with useContext
I’m passing a file made in Mobx to Contextapi, but Mobx is in class mode and the initial states are like this: @observable nomeFantasia = '' @observable cnpj = '' @observable inscEstadual = ''…
-
0
votes0
answers18
viewsI need help with Dispatch within the context in React
I made a resquettes to save an image in our API but I’m having problems in the Dispatch of this resquet and worked: const trocarAssinatura = async img => { dispatch({ type:…
-
-1
votes0
answers21
viewsMy useReducer does not work
I’m making a shopping cart with useReducer and I can’t change the inCard for true and the qty to add one more to each click. What am I doing wrong? import React, { useReducer } from 'react' import…