Skip to main content
Stack Overflow
  1. About
  2. For Teams

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
Advice
0 votes
4 replies
80 views

I am trying to move to RTK Query, but am struggling with one thing - how to access React Context. I currently am using custom hooks to query a back end. Depending on the environment (dev, uat, prod), ...
2 votes
1 answer
108 views

This is my structure about code: src App.js pages ConfigurationPage.jsx provider ConfigurationProvider.jsx context ConfigContext.jsx Explain bug: The code is executed 2 times in provider. The ...
0 votes
1 answer
77 views

import { createContext, useContext, useState, useEffect } from 'react'; import { Appearance } from 'react-native'; import { lightTheme, darkTheme } from '../utility/theme'; type ThemeType = typeof ...
0 votes
0 answers
73 views

My turborepo has several packages, one of which is a ui library that uses some context providers. I export these context providers (Theme, Toast, etc.) so that I can use my UI components in my apps ...
0 votes
0 answers
47 views

if I login with wrong username or password the server (NextJS) will return error message with status code 401, what should happen in this case is that !res.success will be executed and it's indeed ...
0 votes
1 answer
91 views

I'm building a React app with React Router and a context provider that loads property data based on a propertyId route param. In my App.jsx, I have the following routes: <Route path="/edit/:...
0 votes
1 answer
93 views

When I make a component that relies on something like the currently chosen language for example, or maybe a special query function to fetch data, and I provide either of these things via a ...
1 vote
1 answer
73 views

In my Expo React Native application, I have a context variable (trackingAsked) that is also a state variable that I use to display a different opening screen. Everything works fine. On power up, the ...
0 votes
1 answer
54 views

I need to save the ID of a field from the settings.tsx view. That value need to be used with other view, like stations.tsx, alarms.tsx, map.tsx. If later, I need to watch another field, I can change ...
0 votes
1 answer
53 views

I am a novice and I need to use a parameter for all view/page of my React Native App. Scenario: from my setting.tsx view, I can select a field as a preference. From the stations.tsx view, I use ...
1 vote
1 answer
78 views

Although the docs for context say "React automatically re-renders all the children that use a particular context starting from the provider that receives a different value.", from my testing ...
-1 votes
1 answer
55 views

Why do I need to write .Provider? It works perfectly both with and without it. Code below works: import { useState, useEffect, createContext, useContext } from "react"; const ThemeContext = ...
2 votes
1 answer
78 views

In my React Native app, I'm having a problem where the setState function is not being recognized as a function. I already inserted the context provider on the App root page and exported the context ...
0 votes
1 answer
78 views

Basically what title says. I want to know if there is any package or other way to declare a context to get data from it (I don ́t need to modify that data) without having to declare a provider, a type ...

15 30 50 per page
1
2 3 4 5
...
241

AltStyle によって変換されたページ (->オリジナル) /