| {"_id":"doc-en-react-d8ee1ccb8399f810362f1a0abd267e8242d6b55ced92ad6d4ce964cd672b1c32","title":"","text":"It looks like this: It happened two times on random commits, and I don't see a pattern. Probably caused by me changing how tasks are distributed between parallel nodes in I don't understand why would try to run before a build exists though (if that's what's happening?)\nI think this one would require some experience with CircleCI. I don't have any pointers as to where to start: I don't understand why it's failing myself. So it's not a very beginner-friendly issue (I marked the difficulty as medium for that reason).\nAnother example:\nI want to work on this. After doing some research on circleci document, I didn't find the document said about parallel test and deployment sequence. I'm curious about how circleci deal with parallel test and deployment sequence. I think there are two situations: all parallel test finishes, run deployment sequence. If this is true, I think it won't cause current test error. container runs deployment after the container's test finished. I guess it is more likely in this case. Sometimes it passed, it's because node 2 already built file. Sometimes it failed because node 2 didn't build file yet. So I think maybe that's because each container will run deployment after that node test finished. If the situation is as above, I come up with two solutions. we want to keep current test flow, we can try to keep each node builds time balance. this test at first, then run other test parallel. reference link:\nOnly node 2 does a full build. So I don't understand how deployment on other nodes could work at all.\nOr do nodes share the file system?\nI think nodes share the file system. Otherwise, it should fail every time. It will be easier to debug if we can add more log, like current build time and .\nWould it make sense to change the upload script to only run on the second node?\nYep, I think so, because in the document I can't ensure whether deployment stage is triggered after all parallel test finished.\nCan we just put the deployment command right into the test command? Is there any benefit to separating them?\nI think it's also workable, but may lead misunderstanding. Cause we put build process to test stage. Or we can try to use stage. Run at compile stage, so we can promise and stages have needed file."} | |
| {"_id":"doc-en-react-e735e4bcc04de4af8c79e9b836d6bd97863c094232bf2c644c6a4d2b1d364c3b","title":"","text":"The interesting part is our regular tests don't need compilation. If \"compile\" stage has to run before any other stages then we'll wait unnecessarily. I'd prefer to have a single script that does everything than to buy into CircleCI specific terminology unless it buys us something real good (e.g. parallelism was very useful). Maybe can try this:\nOK, I understand your consideration. I think this fix will work. Just tell me if anything can help."} | |
| {"_id":"doc-en-react-32fed7447c33e1c49292377f28ba22b1f003566fcb0c01f418bb8b8e131f1319","title":"","text":"I've noticed a strange bug with the react redux opt-in. If i use it with a connected class component, everything is ok: If i use it with a connected functional component that use with , i obtain a strange error: in method. I create a codepen to reproduce the issue: PS: Sorry for the cors error, but i don't find the way to add as cdn\nI believe the issue here is that expects the second argument to be a function that returns the reference: See: for more information about the API of the hook. Maybe the error thrown could be more clear?\nYou're right, accept a function as second argument. A warning on wrong argument type could be a good idea.\nIll take this issue on\nSure\ni get TypeError: React.useImperativeMethods is not a function in 16.8.0-alpha.1 but when back to 16.7.0-alpha.2 not get this error\nThe hook was renamed in this PR: Most likely between the 16.7 alpha and 16.8 alpha\nYeah, it was renamed.\nyes it work good after rename it where i can get changes between alpha version ?\nCommit log. We don't write changelogs for alphas.\nI'm taking this in since we want to get Hooks out sooner.\nalright np"} | |
| {"_id":"doc-en-react-6b3c5af2ada23f47aa80eedc03ca3a83d950eba15ef87f3dd6836f67ab1f9949","title":"","text":"In we landed a change to the Flow types in , making the types for the various types recursive with their and properties. On that PR we may have been running an older version of Flow - I'm not having luck finding the record of when Flow ran for that PR, so not sure. In any case, that PR was merged even though it had the recursive Flow type definitions, plus one or more Flow errors which were unrelated and not detected. The problem with the recursive type definitions is that recent versions of Flow will go into an infinite loop if they try to infer types which are recursive. The solution may be to add more detail to those types, but to unblock things we temporarily made them looser type definitions."} | |
| {"_id":"doc-en-react-02f66d4e335d6ddaefdaada0c5924337c1569646c887a9e0f46ffcf90b1e6c5d","title":"","text":"Appears to be working in Firefox but at least Chrome & Safari are broken. Should be a really recent regression so very few possible changes to blame... Easiest repo: the todo list on our homepage.\nJust a heads up but this still seems to be an issue even on 15.4.1. I've been struggling to reproduce this because it seems to be some sort of ninja bug. Nevertheless, I was wondering if anyone is still dealing with this problem?\nI haven't seen anything.\nI'm still seeing this issue.\nPlease open a new issue with a simplified repro case if you're still seeing this!"} | |
| {"_id":"doc-en-react-473a4b58713ca7c8d0e8060a45651ad2625b8e108683a3fbb58f5695d87bc14b","title":"","text":"Do you want to request a feature or report a bug? Report a bug What is the current behavior? The hook's value is shown as in React DevTools if the value is a string or a number. Clicking on the bug icon prints the correct values to console. ! If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. CodeSandbox: Direct link to page so you can see the DevTools: What is the expected behavior? The DevTools should show the correct value of the hook. Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? React 16.9.0. Google Chrome [Version 77.0.3865.90 (Official Build) (64-bit)] running on Linux x64. This issue appeared after version 4.1.0 (9/19/2019) of the DevTools Chrome extension. Might be same bug as but this one appears without any complicated reproduction steps.\nLooks like the issue also appears with boolean values.\nHaving the same problem. The extension worked fine after I downgraded React to version 16.8.6\nI think the only significant difference between React v16.8 and v16.9 is that v16.9 injects the function DevTools uses to support editable hooks (in other words, DevTools is using a different code path when you run v16.8 vs v16.9). I think that means this bug is probably related to somehow. Will dig in more.\nShould be fixed by\nThis fix will be released with 4.1.1 (sometime soon)\nThis fix has just been published to NPM and posted to Chrome/Firefox as v4.1.1"} | |
| {"_id":"doc-en-react-6746ac08815bbf89a554f2599c24efc7ee4f226755f4ae042a57183292a2342c","title":"","text":"Since upgrading from beta3 to rc1 I've seen this error a few times in production. Haven't been able to trace the source yet though. cc\nI was unmounting a root during a keyboard event which caused this to happen. I think this has always been a problem? Perhaps we've only been lucky... leaving open just to be sure. EDIT: Could it make sense to have something along the lines of ? Allowing you to schedule things to occur as soon as the current transaction ends.\nThis invariant was new in this release. We also hit one case at FB that I haven't yet investigated. Probably need to change something for the final release.\nI have seen this on RC1 can't find a sequence of actions to repeat it.\nI'm running into this issue as well when conditionally rendering based on state. Not sure how to boil it down to a simple reproducible bug report yet.\nMy issue only happens when I am leveraging FastClick. Didn't happen before 0.14.\nI've found it is because the events are handled in a different order with fastclick, so the batching gets weird...\ne.g. click gets fired before touchEnd, so click handler setState to remove subtree, and then react tries to do something with it in touch end perhaps?"} | |
| {"_id":"doc-en-react-19961fc470123ba131df0c13acdc16dca9ae2f0bc85b5a2da9d0662a1783f6d5","title":"","text":"In this repro, I created 2 buttons and only one is rendered at a time. One button's click handler is hooked up to React's synthetic \"click\" event while the other is hooked up to the native \"click\" event. Even though only one button is rendered at a time, a single click is triggering both click events. This bug can be hit by apps that mix React components with non-React controls (e.g. jQuery UI). I reproed this in Chrome with React 0.13.2. to the button labeled \"One\" Expected: There's a button rendered labeled \"Two\" Actual: The rendered button still has the label \"One\" If you open the console, you'll see \"goToTwo\" and \"goToOne\" which indicates that the \"One\" button's click handler ran and then the \"Two\" button's click handler ran (even though we never saw button \"Two\"\").\nI experimented more and came up with another repro: In this one, you click on a button with a native \"click\" handler which causes the button to go away and an input field to be rendered. It results in this exception: From these 2 repros, it seems something strange is going on when calling from within a native \"click\" handler.\nIt works if you add to the event handler.\nThanks for the workaround. Is the behavior without the by design? It looks like the bad behavior is being caused by the rerender happening synchronously within the native \"click\" handler.\nThis looks bad. We don't do a great job interacting with native events. Sebastian wrote a post about this once-upon-a-time, how native and synthetic event systems are, by and large, not interoperable. Even so, I can't see a reason we should fatal like this. Do you understand what's going wrong here? What a fix might look like?\nThis happens when we handle a click event from a node that's been removed in between when the event is triggered and when React receives it. How should we deal with the case that events fire on detached elements? Should we ignore events for nodes that aren't in the document? I don't think the bug is easily fixable otherwise because we don't have the old event handler after the reconcile that removes that node.\nHere are some additional details about the impact of the bug."} | |
| {"_id":"doc-en-react-7851a482df6560c8b9755474dda32fba2e00952e4178b5bb7f60e2baae6ce704","title":"","text":"It sounds like this bug is likely to trigger when you use a non-React component (e.g. jQuery UI) in a React single page application and the non-React component triggers a navigation within the app.\nThanks for an excellent bug report and good repro case! I think this happens because we use the \"root id\" to determine which element was clicked. In the repro case there is no \"key\" as part of the root ID for two reasons: 1) It is not a child of a container (multichild) so it doesn't get a key to the root ID. 2) It doesn't have a unique key and doesn't need one because it the button is of a different type. If I make sure that a key is used as part of the root ID the problem is solved: So the problem in the repro isn't that we're firing on a removed node, it is that we're firing the event on the new node. This would be solved if we used a unique ID per instance to identify event handlers instead of a generate root that is non-unique. Which I think we wanted to do anyway. Is there another repro that shows a different issue?"} | |
| {"_id":"doc-en-react-bda68aba5b773f0e231d8ae9f598c5dea11ff75961a86d42353566558f7ff8f7","title":"","text":"Since copy+pasting our code makes it too easy for people to XSS themselves, lets just add a comment in there about it.\nPR at - let me know if that's what you had in mind!\nMy intuition is that it makes more sense to fix the example (call a sanitization library) or to change the example completely (demonstrate something else that is safer). It looks really bad to have a security warning on the homepage of the react site. Makes it seem like our framework encourages unsafe operations, rather than a safe-by-default way of doing things.\nShould switch the demo to use a different library like markdown-js that escapes everything and doesn't support HTML:\nmarkdown-js looks good. First attempt: ,output Code licensed if someone wants to turn this into a coherent example; I've signed the CLA.\nThat's a good suggestion too :) - what are your thoughts? I'm happy to change the example to use like people have suggested above. nice usage example :+1:\nUh yea, that sounds fine to me. This behavior is definitely non-standard markdown but it's an example so not a big deal. We should probably do the same for the tutorial while we're here. And it's on cdnjs so that's all pretty easy:\nJust going to use marked instead, which I'm already familiar with and has an option to sanitize input."} | |
| {"_id":"doc-en-react-593d62aabd411439866c817fb1e4ea64d8a16337e89ffadf74b971d86d744b40","title":"","text":"<!-- 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 Dev Tools version: 4.6.0 I'm not sure there is a problem with within package, or it's just my misunderstand how it works, but script create production build. Command above runs a each script (per browser) in which is set to . run in creates minified version of files. where has set to . Each step in should be replaced from to\nSend a PR? This does look odd.\nSure, I'll take a look at it tomorrow, it's looks odd and incorrectly but need to check there isn't any trap with that"} | |
| {"_id":"doc-en-react-ca19df289e02684e61e07a528776d59aafa3f9ae31aa0dfa1ca6abf5d058dfe3","title":"","text":"There appears to have been a change in how is generated between 0.13 and 0.14 which is causing a number of our shallow rendered tests to fail when upgrading because the deepEquals fails on the property. Here is a simple example component which exhibits the issue.\nI've been seeing some similar issues with shallow rendering. My current (messy - sorry!) workaround is this: Let me know if that helps! My version currently breaks some of the Jest tests, but I'm happy to work on this some more and submit a PR.\nThank you very much for this, it's been a tremendous help! While this solved the problem for my test case above it still failed on a large number of our more complex tests. I've been iterating on it and once I have all of our tests passing I'll add the updated version.\nHere is the updated workaround, it works for our 238 tests of varying complexity but I'd be interested to see if it passes all of your tests as well.\nAwesome! If you don't mind trying, what happens if you do and then use the earlier ?\nMuch cleaner thanks, I guess I was in my head too much :)\nI prefer applying a monkey patch, until we have this fixed in react by wrapping TestUtils in my own module:\nThis should be fixed by ."} | |
| {"_id":"doc-en-react-5b14df309377a17bd5514bd579e6532180f9dee2acbfcb39a58bb5a33ba12481","title":"","text":"<!-- Please answer both questions below before submitting this issue. --Please provide a link to the URL of the website (if it is public), a CodeSandbox () example that reproduces the bug, or a project on GitHub that we can checkout and run locally. If possible, please describe how to reproduce this bug on the website or app mentioned above: <!-- FILL THIS IN --<!-- FILL THIS IN --<!-- FILL THIS IN --<!---------------------------------------------------<!-- Please do not remove the text below this line --<!---------------------------------------------------DevTools version: 4.13.1- Call stack: at chrome- at (chrome-) at chrome- at listener (chrome-) Component stack: (none) GitHub URL search query:\nHi I'm sorry you ran into this problem Unfortunately, it doesn't look like this issue has enough info for one of us to reproduce it though. This means that it's going to be very hard for us to fix. Please help us by providing a link to a CodeSandbox (), a repository on GitHub, or a minimal code example that reproduces the problem. (Screenshots or videos can also be helpful if they help provide context on how to repro the bug.) Here are some tips for providing a minimal example:\nI am also having this bug\nSee the comment above please :) Repro is needed.\nThis happened to me, the node wasn't appearing in the Components tree and I was getting this error. The problem was that my attribute was way too long\n! suddenly having this issue right now. I thought it was because of my commits, but changing to another old branch just give the same errors. it was working just fine yesterday, don't know why. maybe due to the devtools update or something? btw I'm on react 16.8.6, react devtools 4.13.3 (5/19/2021)\nTry updating to the latest release (4.13.4) just to rule anything out. But if you're still seeing the issue, then we still need a repro case.\nat first the bug still persists. with same error log. then I retried close the devtools and opened it again (I think I actually have done this as well before) then somehow it works now. the error log still shows up but at least now all components are showing on the devtools, and that's all I need."} | |
| {"_id":"doc-en-react-08b723364bc5c4576a513010a372c7287da5a14b18ef1da84116bda7cdd5b8b4","title":"","text":"in addition, I found this ! and I was trying to hide that component (which has no recent changes on it) to see whether it has any impact. or any component that last showing on the devtools. but for now, that'll be all. thank you for responding\nI appreciate the extra information, but this isn't a description that I can use to reproduce (and fix) the bug. I need an actual website (or code) that I can run along with instructions (like \"do this, then this\") so I can see the bug.\nThere are some simple code could help reproduce. You could try following code sandbox link. The reproduce steps are: \"Do not\" open develop panel. to develop panel and go to react dev tab. Errors was shown. I guess it's kind of race condition. When I change the component order such as It will work perfect. Ps: brief explain what component do. The PageLoadProgressHandler will dispatch float element to PopupPool.\nExcellent! Thank you, Super interesting that this bug only occurs if you wait to open DevTools until after the page has loaded.\nI think it is because only have two components, I have two sites, one it will always happen, another will random happen. or maybe code-sandbox do some strange things.\nThis is interesting. The reason DevTools throws is that the Fiber's owner (the attribute) points to a Fiber that hasn't been mounted yet. That seems unexpected. This repro is just a wrapper around two NPM packages. Where's the source code for these packages? :D Edit I found it, although there's a lot of indirection here_. Tracing one package which imports another which imports another. Would be helpful if it were flattened but I guess I can always step through the bundled source.\nPopupPool: PageLoadProgressHandler: Good luck... XD.\nInterestingly, if I copy the , , and source files into the sandbox (and only change the import statement in ) the bug goes away. That's surprising.\nI wonder if I'm running slightly different code? The debug log shows a slightly different tree structure."} | |
| {"_id":"doc-en-react-a2a4fb71d5d3b864e65637ebe9f2baaf476cc588c4fe7c6119965be14b4934d0","title":"","text":"Is the version of the source you linked me to the same as the one the Sandbox points to in NPM, Edit Looks like the repro is using 0.18.8 (released a couple of months ago) but the latest NPM release is 0.11.1. That being said, it doesn't look like the files that are being imported have changed (at least not in source) so I'm still not sure what's up.\nI change two main components to hook style then get better performance, it reduce the error happen, but I still could get error. Some error is happen after component render done and open the panel same behavior with pervious. I'll log my changes in following issue ticket.\nWould be nice to get a smaller reproduction of this issue (all of the code in one project, rather than spread across many NPM packages). That's what I was trying to do with moving the source but then the bug goes away b'c the code seems to be different. I noticed one potential difference being the indirection but I'm not sure how likely that is to be related.\nLooking at the error while debugging, it looks like the , then either renders it or dispatches a popup event to show it. I'm not sure why (too sleepy to think it through maybe) but sometimes seems to be mounting before_ has, which goes against an assumption in DevTools. Will dig back in tomorrow.\nI really appreciate the repro case, but there are so many layers of indirection between the various NPM packages being used to dynamically create the components. It's difficult to trace through. I'm going to hand this issue to you and ask for a smaller repro case. (Without 10+ NPM projects that each require each other.) Is this something you can help with? Edit I fixed this () but the test case I is not great since it relies on unsupported side effects to trigger the problem case. I'd still love to get a smaller repro so I can (1) be sure I fully fixed the problem and (2) add a regression case so it doesn't get re-introduced.\nBugfix released as\nthank you fixed on version 4.13.5\nThanks your effort. Your fixed also be success from my side."} | |
| {"_id":"doc-en-react-a67bb8376120b6e82f0ec7816daa64a33d39d6f140cc4daae8de19fe914fffd1","title":"","text":"Follow up from Here's one I found. These two invariants: are in a function that's behind a DEV block: I don't think this is intentional, but need to verify. There may be more. I'll use this issue to track while preserves existing behavior.\nHere’s another difference: in development, putting a string ref on a functional component throws with: Stateless function components cannot have refs. but in production gives you: Element ref was specified as a string but no owner was set."} | |
| {"_id":"doc-en-react-2a6eedbe52e90bab8f5538f15adbae0381e1db4f3c78dccc178aacb85f77e833","title":"","text":"I don't know where the right place to link to them is. Maybe \"Getting started\", \"Tutorial\" and \"Tooling integration\"?"} | |
| {"_id":"doc-en-react-3716929f5f424966d8556311ed5fe7cc53d818b25253edc9de6541f96ad448ed","title":"","text":"After updating react-dom to version 17 the build now includes () which isn't supported by ie11 without polyfilling. Coming from this line. Tested with just the default cra production build to make sure it wasn't a problem with my webpack config and the same issue. Tested using CRA on version 16.9.8 of react and react-dom which works with the production build for ie11.\nConfirmed with https://csb-hznfc- (built from ) which errors with \"SCRIPT438: Object doesn't support property or method 'fill'\".\nAny chance you could confirm the fix on a real IE\nGonna wait to see if a few more bugs get reported in the next few hours. Then will cut a patch.\nShould be fixed in 17.0.1."} | |
| {"_id":"doc-en-react-184f91d84492376e91bb3ce0eef633ad1d542d121a8387ded7325160c8768b6a","title":"","text":"We're basically keeping 2 copies of documentation in sync and failing. We should just point at and We should maybe make the permalinks on our site redirect or just link offsite. We should also look for links in our docs pointing to those pages and update.\ncc\nalso cc\nDefinitively agreed, we should link all the traffic to the dedicated website. See the Complementary section on Flux website"} | |
| {"_id":"doc-en-react-dc8da7a6c3fb2961be71e65b461606628545463378521ea8f9e19712a73591ca","title":"","text":"I a \"bug\" today that made me spent 1h figuring out what was going on: I'm using an external component that accepts a prop in order to set the of the root element, but this same component also accepts a prop which I wasn't passing, and by default, it was set to . The result: React didn't throw an error nor a warning, however, the resulting element in the DOM didn't contain either or , and since the element had a default coming from a CSS class, it took me a while to figure out why the color that I was passing wasn't being applied, and instead it was using the one from the CSS class. See: What I reported above was the case. I other cases as a bonus, as when I was playing with this they also seemed weird to me. On I define the same properties, but because I change the order, it works. On the toggleable ones, initially I can see the background, but after changing it never appears anymore. I'm not sure if I created those extra \"test cases\" correctly. My main concern is really around static1 not outputting anything on the console as a warning. Related issues: I wonder if ( should have covered this?\nThis issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.\nClosing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!\nit seems that the bot automatically closed the issue, but this still needs action. I took a time to investigate it, and I realized that the work Sophie has done covers this case, but there's just one problem: it's disabled under a . I built it locally and flipped the flag, and it works: I can see the helpful warning. It was flagged in , and as per the PR, the original intention was to unflag it on the next minor. Since then we had at least 4 new minor versions, but it is still flagged. Is there a special reason for that or was it just forgotten? tagging you since you this flag, so I'm hoping you can give context here.\nCan we unflag this?\nThis was released."} | |
| {"_id":"doc-en-react-a932c0004128968176c961fe7b2a4c24de84c793eeb3dd4b65cbbea01408e142","title":"","text":"Here's an example: (no jsfiddle because that's broken in IE8)\nI tried to fix this bug yesterday but had a bad time trying to find a fix for a similar cases. I looked at current well maintained libraries and didn't find a way to make scroll bubble or capture it on IE8. Seems like trying to fix it would be a waste of time and would make code much complex, for a browser that is slowly dying. My suggestion is to point that out on the documentation.\nSeems like this isn't so easy. Let's do what says and document it.\ndo you think that we should do a everytime someone uses onScroll on any browser or would that be annoying? I would say it would be annoying but it would also be very frustrating to figure that it's a React limitation after some hours of debugging on IE8 (ugh!)\n+1 on the warning -- would be super helpful.\nreopening so we can add a warning\nWarning was in\nNow that events are listened on demand, maybe the warning should be moved to method, where support is already checked?\nIt also prints the warning if you render on the server, its annoying :/\nThat's odd, I wouldn't expect that code to run at all when using server rendering.\nI see this warning when I'm doing with . Any chance to disable it?\nI also see this error when using ssr\nThis is happening to me with JSDOM as well and in my case our team project standards aren't going to accommodate leaving these errors in the console when tests are run. How can I suppress or stub this out. It's not just obnoxious it is preventing me from getting my work merged in our project.\n/ - I am now seeing this error after upgrading my version of Enzyme to . Did you find a way to suppress these warnings for JSDOM?\nIf you're having problems please file a new issue. Nobody actively reads old issues, and requests for help here will get lost."} | |
| {"_id":"doc-en-react-2d50644914e10b5751903bb65355dc5f5ba6e3cbb7af72fb79c683173a5cbe53","title":"","text":"A component should either be using uncontrolled inputs or controlled inputs, but not both (they should pick a single paradigm, for the lifetime of the component). As a result, an instance of an input should never switch from controlled to uncontrolled (or vice versa). We should warn when an input that was previously controlled becomes uncontrolled, or vice versa.\nCould you provide some code as to how a controlled input becomes uncontrolled and vice versa?\nI just got this warning, can anyone point me to an explanation with a bit more detail? ty\nput your code in a stackoverflow question, and link it here.\nnewswim Read about controlled components and uncontrolled components. Choose one (preferably controlled components), and don't ever use uncontrolled components. If you are using controlled components, make sure you never pass a or to React. And yes, is correct, this is better addressed on StackOverflow.\nI don't consider an input's value being null or undefined as a qualifying factor in determining if an input is controlled or uncontrolled. Controlled forms are a paradigm that may share some qualities with uncontrolled forms. It's about listening to changes and updating the state of the value, but React shouldn't stipulate that the value can't be undefined. It's an additional burden to those following good practice in using controlled forms. This warning should occur if both defaultValue and value props are used throughout the input's lifecycle.\nI agree, but in the sense that they shouldn't be a single component at all, they should be two separate. Regardless I would say that actually providing the correct string value to an interactive component that expects a string value seems like a rather good practice. Otherwise you will have two distinct value states and , but both being intended to mean the exact same thing. No, because being or makes it uncontrolled by definition and you shouldn't switch between controlled and uncontrolled."} | |
| {"_id":"doc-en-react-a25328977cbf76bc3b508d745231e0aa56e3f7d590ad2f7ceaf276e749ebae16","title":"","text":"This has no dependencies so I think we should either publish it as a standalone module or direct people to something else from the community. I'm inclined to do the latter since it means we can wash our hands of it. Our internal usage of is tied to our transforms so we've said no to features that would be useful to others outside FB. I'm concerned we'd do that again. Any suggestions for existing projects that we can point to?\nCan't we just link to a bunch of \"useful scripts\" in the docs and leave it at that? People are free to use/modify them, it's implied they're not being maintained and are there just for getting people started. I feel like a lot of people don't understand the current state of , but expect them to be full-blown frameworks and updated with every feature conceivable. Publishing on NPM kind of continues that trend and I suspect no-one on Team React really cares about the addons enough. So I would say, make them available in the docs (as code/files) and let the community sort out publishing/improving/direction.\n...Can I \"steal\" the code and post it somewhere else under my name? I do need it for another CSS repo of mine, and it's really not React-specific.\nAfter talking with Jed at the conference, I think I'll just point people at\nPete hunt already has react-classset module on npm I believe as well\nAccording to the react-classset has been deprecated in favor of the above mentioned library.\nIt is. They're pretty much the same except for some negligible differences so I deprecated the former (the latter has an active maintainer)."} | |
| {"_id":"doc-en-react-a1ec312e283159f26e0810232ac577e1b491bd7a2e41ef77639a5a1a6e69ad7f","title":"","text":"for example, when the original value is '.98', we need format it to '0.98'. but it is not take effect\nThis is working for me -\nyour example is not same with mine. the key is .98 can't be formated to 0.98. Because as number they are equal.\nJust housekeeping. Do we close out issues before a release with the fix has shipped or wait?\ntypically I close the issue once the has been merged into master\nAwesome, thanks! This should land in the next minor release of React:"} | |
| {"_id":"doc-en-react-bcec4924c65bed9eaf4f2164420d72977dc52095a7bc3aca95abe7e231d936e6","title":"","text":"DevTools tells Babel to parse the source code using \"jsx\" and \"typescript\" plug-ins: This will work for some simple usages of Flow, but syntax may diverge and cause the parsing to fail. Let's scan the source code for a pragma and pass \"flow\" instead of \"typescript\" if one is found. We should also add tests for both Flow and TypeScript to the test component pool:\nI think something as basic as this should work:"} | |
| {"_id":"doc-en-react-832461d1f72ff21d99d4083f935ce25899a30aae17475b0c8a67c7f1b0380ed5","title":"","text":"React 0.8 React 0.9 I think this is because of switched to in 1.0.0. I submitted a to envify which uses instead of recast. This brings us back to 1.5s and delivers the same advantages as recast version (preserves code formatting): I think this is blocker for 0.9.0.\nWhat command are you running, and in what directory? I'm having trouble reproducing the slow-down with just ."} | |
| {"_id":"doc-en-react-a9430f1b4acf3a38befd950f7bd1a8df5b8a87bbc5ded6086aacb71a782df8a6","title":"","text":"Many of the issues created with the with the template are missing repro information (e.g. a \"localhost\" or otherwise invalid URL, missing or no repro description). I usually have to review, label, comment, and close this by hand. It would be nice if we had an automated action that checked: Was the issue made with the template? Does the URL section have an invalid URL (e.g. \"localhost\" or \"company website\") Does the repro steps section have invalid steps (e.g. \"don't know\") For issues that pass all of the above text, the bot should: Assign the \"Resolution: Needs More Information\" label Close the issue Leave a comment explaining that repro information was missing and that we'll re-open it if information is provided\nRelated action:\nGoing to play with this idea here:"} | |
| {"_id":"doc-en-react-16680cd16785bd149ce8f71ec27813f47ce0e569c64f71f4fc951f60d8a8becc","title":"","text":"I am working on a project that has strict accessibility requirements. The table I am putting some data in has to implement headers and ids attributes to meet accessibility. See W3 techniques here Unfortunately the \"headers\" attribute is being stripped out because it's not supported by React (it's not on the supported attributes list). Can you please add support for the missing standard attribute called \"headers\"?\n+1\nAs a workaround I believe on a you can grab the DOMNode with a ref and add what you need."} | |
| {"_id":"doc-en-react-0096013fb4cf0b8fdc3e43b92829e482b2e25e28b443871d5fa8617b278878ee","title":"","text":"As it is known (but ), React's SyntheticEvent is pooled. This is confusing for many users as they don't understand why the event starts to behave strangely when used in an async callback, like inside a , a or a callback. There has already been an attempt to solve this problem here: The code of SyntheticEvent's default methods is: It may make sense to be more defensive because calling on a pooled event will raise . It would be more useful to add a check like:\nTo illustrate the problem in not being defensive, I would give you this commit that has made it into production as a workaround in React-tappable: Basically the user is trying to assign an empty function to a SyntheticEvent that as been put back in the pool (the call to persist was from another PR at the same time). And we were basically 3 concurrent PR to try different solutions to the exact same problem.\nAs the person who made the PR in a panic, I did find the code that broke in react itself. the preventDefault method tries to call the method on . A simple if check for in the method, and a no-op if null would be a great fix to this problem. Similar to how setState is handled on an unmounted component.\nI think React should not swallow this error and be fail fast, because this does not make any sense to preventDefault in an async callback (because the default already has been applied), React should rather throw an error. But this is only my opinion, because the browser behavior with dom events is not fail fast and swallow that bad usage of preventDefault. I mean the browser does not throw an error when we do: It simply has no effect (like what you suggest) I don't like this and would rather change the behavior of both React and the browser, but I don't think I can do much on my own... Maybe at least React could issue a warning in DEV env?\nYeah, I think warning is appropriate here.\nA warning would be great!\nJust wonder what kind of message should be put into this warning. If event pooling is not going to be documented (will it?), it may be strange to explain the pooling system inside a warning no?\nYes, event pooling should/will be documented. Feel free to submit a PR. We should add a warning to let the user know that the event has been returned to the pool and so invoking methods on it makes no sense."} | |
| {"_id":"doc-en-react-a921f1409d3df9aa98ff285bf83b4494772cc9ad53fb31860c5c3a2f4b8d23cf","title":"","text":"Once the docs are written, we can add a link to the end of the warning.\nGot a PR for this! Would really appreciate some feedback."} | |
| {"_id":"doc-en-react-e67de791693db938af10b78c2ee6743684ef35b812d1374870cdb39182ae80b2","title":"","text":"Issue with the reproducible example . Full build contains non-standard iterator. Theoretical, it can be to ES in the future, it can be (or already ) to another libraries. should take into account possibility iterable numbers.\nWell, the good news is that if this is already on enough pages, then introducing iterable numbers may not be web compatible anyway. I think that this is only in DEV only code. Unfortunately a lot of pages incorrectly uses the DEV build of React.\n\"good news\""} | |
| {"_id":"doc-en-react-1cb90c7aac9a7cfe40becf0eca154c58c77a676f1f4e00a566e75f770585c004","title":"","text":"Do you want to request a feature or report a bug? Report a bug What is the current behavior? React sets (via attributes / defaultValue) on all inputs with and no value. If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle () or CodeSandbox () example below: (actual, React) (expected, vanilla DOM) What is the expected behavior? value attribute should be empty unless passed via props. Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? React 15+, any browser.\ncc\nI think this happens because the default value reported by checkboxes and radios is \"on\", in absence of a value property/attribute. Unfortunately, for ~16 our controlled text input code \"detatches\" value by assigning it over: We have some updates on master that prevent this, but I'll prep a test case for it and send it out. I'm also working on a PR that isolates the controlled checked and controlled value code to help prevent accidents like this in the future.\nSent with Lucky number .\nWe now have a test to confirm that this works as intended on master. This should land in the next release of React."} | |
| {"_id":"doc-en-react-d767012c53578a4252ea756ea2bec051c5c85387c9196208e45642bc9e10703d","title":"","text":"is currently only supported as element, not as attribute in . Since it is unknown to react it's thrown away on render.\nI'd like to take this!\nIt's yours Let me know if you have any questions.\nCool! :+1:\nCan we get this into a PR pretty please? :o)\nUmm this was merged 3 years ago already...\nmy apologies. I came across this from a Google search after using cite in blockquote in React 16.8.6 was throwing an error for me at build time. I'll have to dig deeper into the cause."} | |
| {"_id":"doc-en-react-82a6c4b7c3975db5a9af586796aad4ea566bd9286ceba387b4e0f0b18ae6a818","title":"","text":":+1:\n+1\n+1\nI'mma jump on the :+1: bandwagon too. Great idea.\nI don't want to keep duplicated issues opened so just to sumup: said it makes sense to implement \"namespacing\" using colons as opt-in, config-defined option, where one of the possibilities would be a member expression. I don't have enough time to implement it this way, so I closed my issue. More on why&how in jeffmo's final comment and in in general\n+1\n+1\nA non JavaScript-first implementation that wouldn't require changes to :\nPR landing for JSX member expressions , can close this."} | |
| {"_id":"doc-en-react-35ffa18c5313986ba4ea1acf01c369528d227057b1903da8bd8985c29d98a2c9","title":"","text":"From : cc\nFixed.\nReopening because new docs don't have that info, and it is confusing. We should re-add it.\nI am looking to make my first contribution and would like to fix this issue.\nI also opened a PR for this on last week, restoring the original note. I notes for discussion on a more thorough example on the PR, like the current example has, but have not done much beyond that. Do we think that such an example would be beneficial? I almost think not, since the difference is just treating as an array with , but I'm curious to hear everyone else's thoughts on that.\nThere hasn't been any further discussion in PR or on this issue in the last two months, so is that PR all we need to do for this? cc\nSorry. We’ve been busy with a rewrite for React 16, and haven’t been actively reviewing the PRs.\nFixed in\nNo sweat, I figured as much. React 16 was absolutely worth it, great work!"} | |
| {"_id":"doc-en-react-4b2794ca5e07353a08e2f0daa7c1a67cb14925f720994521e725503133721b72","title":"","text":"Steps to reproduce: 1) Disable all add-ons in Firefox 2) Open an URL that points to a XML file 3) AS EXPECTED: A pretty-printed XML is shown 4) Enable the React DevTools Add-on 5) Open the XML file again 6) FAIL: Only the content inside the XML tags are shown Using Firefox Developer Edition 72.0b6 on macOS 10.15.2\nI am able to reproduce the behavior described using Firefox Developer Edition (72.0b1) but regular Firefox (71.0) does not exhibit the buggy behavior. I don't believe this is something that the React DevTools add-on should be able to cause, since syntax highlighting is a built-in browser feature. There is no error in the console (or the add-on if I inspect it). Just enabling the extension is enough to immediately \"break\" pretty-print for XML files, e.g. I believe that this may be a Firefox Developer Edition bug. It's probably not something that an extension should be able to cause. I'll open a bug on their end: cc\nThanks! I see the same with and the LastPass add-on\nIt's unclear what Firefox is going to do on their end about this, but it seems like we can make this better by checking in the content script if is \"text/xml\" before injecting any tags.\nThis will be fixed in the next release.\nFYI this issue should be fixed in v4.4 (released today)"} | |