text stringlengths 36 4k | label stringclasses 4
values | repo stringclasses 27
values | source stringclasses 2
values |
|---|---|---|---|
Question about React.Fragment and dangerouslySetInnerHTML
React version: 17.0.0
React.Fragment Why not dangerouslySetInnerHTML property | question | facebook/react | nlbse2024 |
Bug: Data is losing during page refresh in Reactjs-Redux; Tried using 'redux-persist' and localstorage , but not working.
In our project,forms(login,signup,logout,etc..) were built in django and through this we are getting the authorization details and this was stored as redux-data and was used in the rest of the appl... | question | facebook/react | nlbse2024 |
react developer tools
I successfully installed the extensions but i am not able to see the the news tabs ( components and react | question | facebook/react | nlbse2024 |
Question: startTransition behavior
I'm very sorry that I'm using the issue tracker to ask this question, but I think others might ask the same question after reading https://github.com/reactwg/react-18/discussions/41 (I don't have commenting rights).
```js
function handleInputChange(e) {
const input = e.target.value... | question | facebook/react | nlbse2024 |
Experimental createRoot method not available in React 17
I am using react and react-dom v17.0.2 and I was trying to use the unstable_createRoot method to render my app but looks like that method is not even present in react v17.0.2.
Can someone comment if this is expected or not.
Thanks,
Arpit | question | facebook/react | nlbse2024 |
Bug: strict mode, initial state changes, and useMemo (with dependency) doesn't seem to be recomputed
<!--
Please provide a clear and concise description of what the bug is. Include
screenshots if needed. Please test using the latest version of the relevant
React packages to make sure your issue has not already been... | question | facebook/react | nlbse2024 |
Question: is there any way to retrieve React Devtool performance data?
Hi guys, I want to get react devtool performance/profiler results, probably a JSON data and send to our local server, I read through the react-devtools-core but unfortunately do to get any clue how to do this ? | question | facebook/react | nlbse2024 |
Question about getting the latest state value in the concurrent mode
<!--
Please provide a clear and concise description of what the bug is. Include
screenshots if needed. Please test using the latest version of the relevant
React packages to make sure your issue has not already been fixed.
-->
React version: 17.0... | question | facebook/react | nlbse2024 |
Bug: It seems that the default value in functional React component gets updated after render.
<!--
Please provide a clear and concise description of what the bug is. Include
screenshots if needed. Please test using the latest version of the relevant
React packages to make sure your issue has not already been fixed.... | question | facebook/react | nlbse2024 |
Dev tools Chrome Extension only works properly in Incognito window
Hi folks,
At some point w/in the last 5 months or so, the dev tools Chrome extension stopped working properly for me in **non**-incognito Chrome windows. It's a bit hard to explain, but i'll try: when i use the extension, react components show up, but ... | question | facebook/react | nlbse2024 |
Question: CM mode and useEffect cleanups
Since CM mode now runs useEffects' cleanups async. Are we still guaranteed that they'll resolve in order? By that I mean, if a component get's cleanup, re-rendered and cleaned up again. That the first cleanup will resolve, before the second?
ComponentA (1) -> thrown away -> Co... | question | facebook/react | nlbse2024 |
Some questions about lanes.
First of all, thank you for reading and patience.
I've been studying the principle of react lanes recently, and its implementation is interesting to me, but I still don't know what the specific problems it solves.
> This constraint was designed before Suspense was a thing, and it made som... | question | facebook/react | nlbse2024 |
Why does React warn about multiple renderers using the same context provider?
I am currently developing a web app that uses both [react-pixi](https://github.com/inlet/react-pixi) and [react-babylonjs](https://github.com/brianzinn/react-babylonjs). Both of these libraries use `react-reconciler` and have a custom render... | question | facebook/react | nlbse2024 |
Showing an Array in string Format in UI
In JS, Array rendered with ',' in between each element
e.g. ['Piyush', 'Sinha']
// Piyush,Sinha//
but in react Array rendered without ',' in between each element
e.g. [ 'Piyush', 'Sinha']
//PiyushSinha// | question | facebook/react | nlbse2024 |
[Micro React Apps] - Need to render another React App into existing React App
Hi,
I need to render another React App (i.e. App2) into existing React App (i.e. App1) on run time. I have hosted my "App2" on a remote server. I read "asset-manifest.json" file from it and on runtime I append those .js chunks in our head t... | question | facebook/react | nlbse2024 |
devtool Api request : add api for customize renderer inspect element
I'm wirte a custimse renderer for render element in canvas(like react-pixi), I want intergrate with react dev tool;
I can hightlight element when click element in react dev tool compoent panel use code:
```ts
__REACT_DEVTOOLS_GLOBAL_HOOK__?.reactDevt... | question | facebook/react | nlbse2024 |
Selenium integration
Hello. I'm not sure if this is an issue, but I would like to know a little more about how react developer tools work.
I want to get reacts props with selenium in order to make easier the debugging of a website.
I'd be thankful with any kind of help you can give me.
Best regards | question | facebook/react | nlbse2024 |
React Hooks will render multiple times after await
```
const [ html, setHTML ] = useState('');
const [ script, setScript ] = useState('');
const update = (script, html) => {
setScript(script);
setHTML(html);
};
update('a', 'b');
```
The above code works fine, React Hooks will render ONCE and combine setScript & s... | question | facebook/react | nlbse2024 |
Extention React non définie sur chrome
react Developer Tools 4.6.0
Google chrome Version 80.0.3987.149
L'outil de développement react est inactif sur la console google chrome | question | facebook/react | nlbse2024 |
Question: Why not useCallback always return static value without deps?
```tsx
function useRefCallback<T extends (...args: any) => void>(callback: T) {
const ref = useRef<T>(callback);
ref.current = callback;
return useCallback(function(this: any, ...args: Parameters<T>) {
return ref.current.apply(this, args);
} a... | question | facebook/react | nlbse2024 |
Question: How to remove dynamic children from Parent State?
I'm using react hook `useContext`. I have two identical components (siblings), each that use the same context that is a list.
**Scenario**
1. The first sibling is created, calls `useContext`, and then pushes something into the list.
2. The second sibling is... | question | facebook/react | nlbse2024 |
Webpack can't find ReactDOM.createRoot
Hi,
I'm kinda in doubt if this is an error or is just me doing something wrong.
I am trying the new react experimental in a very simple existing app I have. Although I had installed the react experimental versions in my package.json, it seems it doesn't recognize ReactDOM.creat... | question | facebook/react | nlbse2024 |
Bug: Nested setState and unstable_batchedUpdates (are they ignored?)
Nested setState and unstable_batchedUpdates (are them ignored?)
React version: 16.12
## Steps To Reproduce
https://codesandbox.io/s/batchedupdates-uselayouteffect-evj8s
open profile after click, you will see 3 commit.
it seems that even if we use... | question | facebook/react | nlbse2024 |
While using useRef , some data has been updated by context value from reducers, when the context value was updated from some other user event, variable used with useRef also updated, then how to use instance variables in hooks?
const CreateNotificationBase = (props) => {
const [state, dispatch] = useContext(Store);
c... | question | facebook/react | nlbse2024 |
Question: Just for my app test. Thanks.
🚨 This issue tracker is not for questions. 🚨
As it happens, support requests that are created as issues are likely to be closed. We want to make sure you are able to find the help you seek. Please take a look at the following resources.
## Coding Questions
If you have a cod... | question | facebook/react | nlbse2024 |
Question: React apollo hooks fails after adding react-native to monorepo
I am trying to create a React web app and React-native app with monorepo by using yarn workspaces. So I created web and controllers and it works fine. I was able to make graphql queries to my apollo-express server. But, after adding react-native ... | question | facebook/react | nlbse2024 |
Question: react lib context overrides app context
Hi, I believe that this can potentially be an issue, though I'm not sure.
I was wondering about good patterns concerning the react context.
Let's get a public library, for example `react-intl` that exposes a Provider (IntlProvider).
Let's create a library `barLib` th... | question | facebook/react | nlbse2024 |
Question: why cann't I set echarts instance using useState?
## Coding Questions
i try to store the echart instance using useState, but after `setInstance`, `instance` is always undefined
```
const [instance, setInstance] = useState<ECharts | undefined>(undefined);
const chartInstance = echarts.init(root.current);
se... | question | facebook/react | nlbse2024 |
help~When I use React.createElement directly and How to pack the component?
hello all.
I was met a problem when I published a react component, I need to help and discuss with you all
I am going to write a component to load `React Component from CDN` and make it like a wrapper component.
```jsx
import React, { Compo... | question | facebook/react | nlbse2024 |
Rendering React component on server to take a screenshot of it
My React application has a list of to do lists like this:
<img width="1082" alt="figma_canvases" src="https://user-images.githubusercontent.com/12554095/71749785-47206c00-2e2b-11ea-8d0c-5a82ceba1b05.png">
> Replace the Figma canvas preview images with to... | question | facebook/react | nlbse2024 |
I can't get the latest status value in the initialization method
I try to get the latest state value in the initialization method, but the result is not satisfactory。
All this happens in function components。
1.react version is 16.12.0;
2.react-dom version is 16.12.0;
this is my demo code :
```
import React,{useStat... | question | facebook/react | nlbse2024 |
[TypeScript]Is there any way to define the state variables when using functional component?
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
If there is a lot of state variables, I guess it is hard to get a whole picture the stat... | question | facebook/react | nlbse2024 |
getDerivedStateFromProps is executed after setState #13015
Ideally getDerivedStateFromProps should not be called due to current component's setState. But it is behaving so. Can someone explain?
Couldn't find solution in [#13015](https://github.com/facebook/react/issues/13015) | question | facebook/react | nlbse2024 |
Why only one component can be render at root div?
I called two render methods to same root div .
```
RenderDOM.render( < Navigation /> ,document.getElementById(' root '));
RenderDOM.render( < App /> ,document.getElementById(' root '));
```
And what i get rendered on my screen is only a App component.
Just want to kno... | question | facebook/react | nlbse2024 |
Bug: React table - Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
**Do you want to request a *feature* or report a *bug*?**
bug
**What is the current behavior?**
Hello,
I am new in React and I am trying to create a simple react t... | question | facebook/react | nlbse2024 |
How do suspense and subscriptions interact?
**Do you want to request a *feature* or report a *bug*?**
Ask a question
**What is the current behavior?**
With `Suspense`, a component throws a `Promise` when it encounters something that's not ready. However, our company's data fetching is subscription-oriented: At a very... | question | facebook/react | nlbse2024 |
Why include refs as a feature? -- seems broken and unnecessary
Refs never seem to work, is this a broken feature?
Why not remove them and just let people use
document.querySelector('#id').action like normal people.
also, what does this mean?
Function components cannot have refs. Did you mean to use React.forward... | question | facebook/react | nlbse2024 |
DevTools component filter does not work with location
**Do you want to request a *feature* or report a *bug*?**
Report a bug.
**What is the current behavior?**
In DevTools when a component filter is added with field set to `location` and regex set to `.*`, nothing is filtered out. (BTW, no documentation in this subje... | question | facebook/react | nlbse2024 |
Why is useEffect hook not activating when a component is reloaded after previously throwing an error?
I am learning React and Redux within a Typescript environment. I have managed to implement a container that dispatches a fetch action and subscribes to corresponding fetch success and error state notifications from a ... | question | facebook/react | nlbse2024 |
Utilize Suspense to express app init loader
With Concurrent mode getting finalized, I went to try to solve an old problem I have.
The app needs to run a series of init steps before it can do anything viable. Each steps depends on the previous one. This is expressed as nested components. The fairly elaborate animated ... | question | facebook/react | nlbse2024 |
Weird behavior with functional components and useState, A bug or "Another rule!"
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
```React : '16.9.0'```
sample code
```javascript
import React from "react";
import ReactDOM from "... | question | facebook/react | nlbse2024 |
i was trying to pass through Hook effect, and the codes used are declared no where. like ChatApi
```js
import React, { useState, useEffect } from 'react';
function FriendStatus(props) {
const [isOnline, setIsOnline] = useState(null);
function handleStatusChange(status) {
setIsOnline(status.isOnline);
}
useEffe... | question | facebook/react | nlbse2024 |
Why does parent's componentDidMount gets called first, then child's?
I thought it was always the case, that first, child's `componentDidMount` would be called, and then, parent's.
However, in this example: https://codesandbox.io/s/tender-jones-gpkz3
First parent's `componentDidMount` is called, then Child's (check t... | question | facebook/react | nlbse2024 |
Read latest state value in event handler
I have this question I could have asked on Stack overflow, but I think it is more suitable for people from react team or more experienced users. So I will give it a try to ask it here.
Imagine I have event handler below where I **want to read latest state value and do somethin... | question | facebook/react | nlbse2024 |
DevTools: Component tree navigation
**Do you want to request a *feature* or report a *bug*?**
Feature
**What is the current behavior?**
Where is no way to collapse/expand component tree or it subtrees.
If I pick element with "Select element" button - I got all the tree expanded, not the only one subtree, where sele... | question | facebook/react | nlbse2024 |
There is no 'rendered by' section in my extension
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
**What is the current behavior?**
**If the current behavior is a bug, ... | question | facebook/react | nlbse2024 |
React devtools always launches in Chrome
Hi.
I have the extension installed on both chrome and firefox. My default browser is firefox. Each time I try to debug a react native app remotely it launches chrome to use the debugger there.
How do I change the default browser for devtools to Firefox? | question | facebook/react | nlbse2024 |
Limitations of context API compared to legacy implementation
This isn't technically a bug, but a limitation of the new context API implementation and also a question on whether this should be fixed by React, or if I should implement a custom, in-house, solution instead.
I have a fairly "edgy" use-case with a componen... | question | facebook/react | nlbse2024 |
Error message when calling work.commit in commit phase
This was me just toying around with unstable APIs. I don't know what these can be used for. Just tried to make sense of them from their names.
**Do you want to request a *feature* or report a *bug*?**
error message of `batch.commit()` is confusing
**What is the... | question | facebook/react | nlbse2024 |
Devtools V4: Breadcrumbs are removed?
**Request for feature**
The older devtools used to show a breadcrumbs/component hierarchy, at the bottom, it is really useful to navigate the parent component, I couldn't find it on the new devtool, did we remove it? any reason to remove it? Will we add it back? | question | facebook/react | nlbse2024 |
Why does DevTool Chrome Extension need access to history?
I woke up today and the DevTool Extension for Chrome asked for additional permissions. More specifically access to history.
I couldn't find any explanations or reference in the changelog, so I opened this issue. | question | facebook/react | nlbse2024 |
Suspense + Concurrent Mode immediately shows fallback when updated from onChange
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Reporting a bug, or at least trying to u... | question | facebook/react | nlbse2024 |
[eslint-plugin-react-hooks]: Can't call hooks on component returned from function
Wrapping a component in a function, returning the component.
tl;dr
```javascript
export function Home() {
return function() {
const [ items, setItems ] = useState([])
return <div>nothing</div>
}
}
const root = document.getElementB... | question | facebook/react | nlbse2024 |
useEffect for synchronizing state and props
Hi. I have a recurring scenario that I’ve been struggling with since the good old days of `componentWillReceiveProps`, and now I’ve pretty much run into the same issue with hooks, so I was hoping I could get some guidance as to what the idiomatic way of solving this and simi... | question | facebook/react | nlbse2024 |
`static getDerivedStateFromProps()` does not works same as componentWillReceiveProps
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
bug
**What is the current behavior?*... | question | facebook/react | nlbse2024 |
Declarative vs. imperative coding style using Hooks
_If this should be asked on Stack Overflow instead, please let me know and feel free to close the issue._
Consider a component that fetches some data in a custom hook, saves the fetched data in a state hook, and notifies the user that data has been fetched using a p... | question | facebook/react | nlbse2024 |
How to test multiple state changes with act?
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
With the new `act` function, I'm unsure how to test state transitions that occur _during_ an event handler processing. For example if I have this handler that is called on form ... | question | facebook/react | nlbse2024 |
[Question] about "._owner.alternate"
It seems that in react@16 every React element children contains cyclic property `._owner.alternate.alternate.alternate.alternate`....

So it is easy to cause "Maximum cal... | question | facebook/react | nlbse2024 |
useState causing children to re-mount?
*bug*
**What is the current behavior?**
I have a hook that is supposed to call a callback after a `setTimeout`. When I render a list of children with this hook, the callback behaves differently when its in a function component with `useState` than it does if its in a class comp... | question | facebook/react | nlbse2024 |
onAnimationEnd/onTransitionEnd Issues
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
### onAnimationEnd creates unexpected behavior
In the following example, I am creating a simple notification component from an array. Each element in the array is used to generate a ... | question | facebook/react | nlbse2024 |
UseEffect how to solve conditional paging list
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
bug
**What is the current behavior?**
UseEffect how to solve conditional p... | question | facebook/react | nlbse2024 |
Mimic componentDidMount but with hooks
We are trying to use Hooks and we want to mimic componentDidMount but our eslint is responding with "React Hook React.useEffect has a missing dependency: '_checkUser'. Either include it or remove the dependency array react-hooks/exhaustive-deps"
If we add checkUser to the depend... | question | facebook/react | nlbse2024 |
Why function as child is not considered as children?
After digging deeper with [this question](https://stackoverflow.com/questions/52553580/react-children-with-non-element-children), I have found `function as a child` is not being considered as **children**.
Take this example:
```
class CountExpression extends React.... | question | facebook/react | nlbse2024 |
× Maximum update depth exceeded in controled way
**Do you want to request a *feature* or report a *bug*?**
- maybe bug?
**What is the current behavior?**
My case is that I want to update state n times by adding different types of fields to the state and then render them.
Every updating of dom(adding new field) I ha... | question | facebook/react | nlbse2024 |
Should setting state inside discrete events cause cleanup to run?
This bug is pretty confusing:
https://twitter.com/kentcdodds/status/1102659818660102145
I think it happens because `fn` scheduled by `setInterval(fn, 0)` jumps in front of the `[running]` effect cleanup caused by `setRunning(false)`. So the interval s... | question | facebook/react | nlbse2024 |
useLayoutEffect in ssr
Hi, I do not understand the situation with this hook a bit. I use this hook to perform the animation synchronously with the state update, if I use useEffect, then I have jumps in the animation, because the animation library does not have time to start. Also, the documentation states that useLayo... | question | facebook/react | nlbse2024 |
Hooks: useState one-off callbacks
**Do you want to request a *feature* or report a *bug*?**
Question / feature
I've been trying to handle a case where I need to execute a piece of code right after the state is set at a particular place in the code. I do understand I'm supposed to use `useEffect` to respond to changes... | question | facebook/react | nlbse2024 |
Prop reassignment in components
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
Prop reassignment in components
**If the current b... | question | facebook/react | nlbse2024 |
Under what circumstances, unstable_shouldYield will return true?
In Scheduler.js,
```
function unstable_shouldYield() {
return (
!currentDidTimeout &&
((firstCallbackNode !== null &&
firstCallbackNode.expirationTime < currentExpirationTime) ||
shouldYieldToHost())
);
}
```
unstable_shouldYield() return true whe... | question | facebook/react | nlbse2024 |
act cannot detect secondary updates
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
bug
**What is the current behavior?**
If a component performs a second (non user tr... | question | facebook/react | nlbse2024 |
Unable to use useContext hook inline in Context.Provider
**Do you want to request a *feature* or report a *bug*?**
Not sure if it is a bug or a feature yet. This relates to Hooks.
It could also be that this is all expected behaviour and one of the workarounds mentioned is required.
**What is the current behavior?**... | question | facebook/react | nlbse2024 |
react-router can't pass Hooks
This is actually an issue of react-router https://github.com/ReactTraining/react-router/issues/6555 but since it's the major routing lib I want to make you aware that there are issues when you want to pass custom hooks via props through your component tree.
Since routing (with react-rout... | question | facebook/react | nlbse2024 |
How will react solve nested contexts?
```js
<context1.Provider value={value1}>
<context2.Provider value={value2}>
<context3.Provider value={value3}>
<context4.Provider value={value4}>
<context5.Provider value={value5}>
</context5.Provider>
</context4.Provider>
</context3.Provider>
</context2.Provider>
</conte... | question | facebook/react | nlbse2024 |
Unable to catch Error emitted in componentDidMount
**Do you want to request a *feature* or report a *bug*?**
Bug report.
**What is the current behavior?**
Error boundary handles `Error` emitted in `componentDidMount` and somewhy **rethrows** it.
```javascript
class ErrorBoundary extends React.Component {
constructo... | question | facebook/react | nlbse2024 |
useCallback/useEffect support custom comparator
Currently we can pass an array as second argument when using `useCallback` or `useEffect` like below:
```js
useCallback(()=> {
doSth(a, b)
}, [a, b]) // how to do deep equal if a is an object ?
```
The problem is it only compare array items with `===`, it there any wa... | question | facebook/react | nlbse2024 |
setState hook inside useEffect can cause unavoidable warning Can't perform a React state update
**BUG**
**What is the current behavior?**
Example: https://codesandbox.io/s/6y1x2zr21n clicking on OK button cause `Warning: Can't perform a React state update on an unmounted component.`
The problem that unsubscribe is ... | question | facebook/react | nlbse2024 |
getDerivedStateFromProps is user-hostile
So I think `getDerivedStateFromProps` as designed turns out to be user-hostile. The short summary is that it makes the pattern described in the docs, https://reactjs.org/docs/higher-order-components.html#use-hocs-for-cross-cutting-concerns, impossible for non-trivial cases.
I... | question | facebook/react | nlbse2024 |
Cases where hooks don't currently provide a good answer vs HOC
(unsure if this is the right place, so trying it out)
I've noticed that the new React Hooks feature is aiming at providing an alternative composition pattern to HOC and render functions, but I believe that many of the use cases solved by HOC (at the frame... | question | facebook/react | nlbse2024 |
[npm:create-react-class] No way to implement getDerivedStateFromProps
There seems to be no way to implement class methods such as `getDerivedStateFromProps` and a few others.
Am I overlooking something?
There is no mention of it here either: https://reactjs.org/docs/react-without-es6.html | question | facebook/react | nlbse2024 |
Element attributes be removed silently in frameset tag
**Do you want to request a *feature* or report a *bug*?**
bug
**What is the current behavior?**
In some historical reason, i am still using obsolete tag `frameset` in my project. And when i render my component which includes `frameset` tag in react, some attribut... | question | facebook/react | nlbse2024 |
Access React component underlying DOM tree
**Do you want to request a *feature* or report a *bug*?**
feature
**What is the current behavior?**
Form component has "form field" children (Input(), Checkbox(), etc) that are validated against some custom rules when form is submitted. Validation works fine.
**What is the ... | question | facebook/react | nlbse2024 |
Question on reconciliation
I think I understood reconciliation in react however there is one thing I would like to clarify.
Let's say on first render, we render:
```
<ul>
<li>Duke</li> // key 0
<li>Villanova</li> // key 1
</ul>
```
And on next render
```
<ul>
<li>Connecticut</li> // key 0
<li>Duke</li> // key 1... | question | facebook/react | nlbse2024 |
Get keys in react-reconciler
I am struggling to implement reusable views on mobile platforms and to make it i need to get key values (explicitly set and generated) in react-reconciler to match two different view trees somewhere outside react.
Is there a way to achieve this?
Thanks! | question | facebook/react | nlbse2024 |
how map ? render An Array Of Elements
**What is the current behavior?**
react16+ support return array components, for example:
render() {
return [
《Li》1《/Li》
《Li》2《/Li》
《Li》3《/Li》
]
}
export default ArrayDemo
----------------
i want to map it with React.Children.map,
for example:
import ArrayDemo from 'xx... | question | facebook/react | nlbse2024 |
Avoid reconciliation, alternative component interface
Hello. I want to ask a question about a way to avoid reconciliation process.
Today I can see the following process:
1. Component wants to re-render.
2. Component render method provides new virtual dom.
3. Some react diff library tries to find some non-optimal way... | question | facebook/react | nlbse2024 |
componentWillUpdate discussion
<!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
Feature : componentWillUpdate Discussion
**What is the current behavior?**
The current b... | question | facebook/react | nlbse2024 |
Suspense: timeout expiration and siblings rendering issues
**Do you want to request a *feature* or report a *bug*?**
Bug
**What is the current behavior?**
Code for reproducing is [here](https://github.com/alexeyraspopov/react-suspense-sandbox/tree/cb3b60be69523de8f720a474c965face2b521b9b). I've also deployed an exa... | question | facebook/react | nlbse2024 |
Use and set a component's state within setInterval function
This is a question, so I apologize if this isn't the best place to ask.
I'm trying to work with a component's internal state within a setInterval function and I know there are some asynchronous problems I need to be aware of. I also know that I can pass setSt... | question | facebook/react | nlbse2024 |
Context API bitmask related questions
I'm playing with Context API bitmask feature to bail out unwanted re-render.
I have a dynamic model ( a JSON object) as context value. By dynamic i meant , the number of keys and structure of the JSON object is unknown. But when the JSON object changed , i know which key is chang... | question | facebook/react | nlbse2024 |
[Question] Context provider state initialisation.
Consider a component wrapping a context provider:
```js
class ValueWrapper extends React.Component {
constructor(props) {
super(props);
this.state = {
value: null,
setValue: this.setValue,
};
}
setValue = (value) => {
this.setState({ value });
};
render =... | question | facebook/react | nlbse2024 |
Is there a way to access new context api within ComponentDidMount?
We are building a react mapbox gl module and we use clone and inject props today.
We were looking into using the 16.2.0 context api but I saw that it will have a new one on 16.3.0 but I can’t seem to find a way to read context details
On componentDidM... | question | facebook/react | nlbse2024 |
Potential Future Bug in getEventKey for Edge with Synthetic Event normalization.
**Bug**
**Current behavior**
React currently normalizes keyboard events cross-browser by falling back on the native KeyboardEvent.keyCode property and using a dictionary object to normalize the key. As noted in the source, getEventKey is... | question | facebook/react | nlbse2024 |
state change in td element
Displaying tabular rows, when setting data in td element, on state change it displays only the currently updated td element data..all the other ones go missing from screen. When the same thing is placed within text box in each td element things work fine.
Following is sample the code :
Wor... | question | facebook/react | nlbse2024 |
Getting started docs are terrible
I just came back to react after about a year or so of not using it and now the getting started docs are pretty much not helpful in the slightest. All the docs are now is just links to other websites without any instructions on how to get a react project running. I remember a year ago ... | question | facebook/react | nlbse2024 |
Concating react with other resources
Hi.
I want to use many libraries and frameworks in my project.
Can I concat React with other framework like angular, vue, ember...? | question | facebook/react | nlbse2024 |
can't edit the wiki
Hello,
I can't edit the wiki to add my website to the list there, is editing disabled? | question | facebook/react | nlbse2024 |
TypeError: Cannot read property 'state' of undefined with create-react-class
I am currently attempting to create a button which is red with the text "Yes" that when you click on it the button changes to a green color with the text "Confirm?" before the final stage in which an action takes place. Where I am currently a... | question | facebook/react | nlbse2024 |
Sluggish scrolling when rendering table with large dataset in React
So I'm creating an application with real-time streaming data in a table using react (v16.1.1). The number of rows shown at a time can be rather large (400+ rows) and when those situations occur, the scrolling behavior on browsers (desktop & mobile) re... | question | facebook/react | nlbse2024 |
forceUpdate recalls all ref callbacks
**Do you want to request a *feature* or report a *bug*?**
Bug, maybe
**What is the current behavior?**
On calling forceUpdate ref callbacks called again. So, doing forceUpdate in ref callback makes infinite loop.
**If the current behavior is a bug, please provide the steps to ... | question | facebook/react | nlbse2024 |
can't access discuss react
I know this is not related to react directly but didn't know where to turn to.
Am I the only one who can't access/login to discuss.reactjs.org? (for quite some time already)
I get error:
_This page isn’t working. discuss.reactjs.org is currently unable to handle this request. HTTP ERROR 500_... | question | facebook/react | nlbse2024 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.