repository
stringclasses
156 values
issue title
stringlengths
1
1.01k
labels
stringclasses
8 values
body
stringlengths
1
270k
facebookreact
can I render every element with different render function
Question
I need some element only have html and do not need datum reactid but I don t except I should render two element with different function e g rendertostaticmarkup rendertostre and combine it because the element could be include by many element render split and combine could cause mistake when element be mu...
facebookreact
onclick change render
Question
hi I m new to react if I want to click the button from dom then change render class from commentbox to commenttext below how to do it use simple onclick function something like if btnclick reactdom render document getelementbyid content else reactdom render document getelementbyid ...
facebookreact
render static html client side
Question
be there any way to get a string of plain html from a react component but on the client side my app have a design editor that let you click element and edit their style nothing new there but I m re make it from the ground up use react both for the app itself and for the template that should be edit inside an i...
facebookreact
issue with reactcsstransitiongroup
Question
I m get this error uncaught invariant violation addcomponentasrefto only a reactowner can have ref you might be add a ref to a component that be not create inside a component s render method or you have multiple copy of react load detail after instal reactcsstransitiongroup and it seem that I ...
facebookreact
tip documentation on access prop of the child
Question
e g be this something you should avoid do
facebookreact
scryrendereddomcomponentswithtag throw error on ff 43 0 4
Bug
if the name of the input field be prop this test fail anything else seem fine only in ff though fail form test should find button debug html 35 1 htmlformelement doesn t have a name property setter for prop reactdomcomponent mixin getpublicinstance base test index js 11797 12 findallinrenderedtre...
facebookreact
enormous datum reactid
Question
I m develop a big gui application chrome developer tool be lag because of datum reactid s reach a hundred kilobyte in size here s a small example 0 1 011 0 1 01 0 0 0 11 1 011 1 011 01 0011 0 10 1 010 1 010 01 0010 1 ...
facebookreact
onwheel stop bubble be not happen
Question
my target I be have a div which scroll but on come to the top or the bottom after the scrolling the div the scroll start happen on the entire page itself which I don t want I think it s happen due to event propagation so I be try to stop in follow manner my implementation I be use extend...
facebookreact
componentdidmount be call before render be completly do
Question
hi as much as I understand react component lifecycle componentdidmount should fire after render be do but I just find out today that this be not the case and I m not sure if this be a bug or lack of understanding from my side if I call a function that return some jsx inside render it a...
facebookreact
drag n drop element sort
Question
hello I need advice about drag n drop sort with react 1 start datum js one two three render dom html one two three 2 after manual sort with drag n drop datum js one two three render dom html three one two ...
facebookreact
way to create pluggable decorate component
Question
how be it possible to make pluggable aop style component which transform prop and transmit it to child more precisely how to pass prop to child element in parent render method I want to use it like this javascript scalable js example of aop style decorate component import react from react ...
facebookreact
difference between currenttarget and target of syntheticevent
Question
there be 2 property in syntheticevent currenttarget and target it be identical usage or what be the difference between they
facebookreact
server and client render the same markup but react still indicate checksum invalid
Question
screenshot 2015 12 22 15 57 53
facebookreact
diff patch with markdown preview
Question
when I preview huge markdown file with change dangerouslysetinnerhtml be very slow can I use react to smart innerhtml I don t know how to do it thx
facebookreact
how would one pass latex code into a component
Question
I have the fairly rare but give the internet by no mean unusual situation where I need to embed latex code that need to be interpret later by a mathjax or katex etc the follow code doesn t work due to jsx intepretation of the bit inside p 1 some point p 2 some other p...
facebookreact
how to get the index of click element
Question
I have some list item and I want know which one be click by user so I set onclik on every item and I user event target to get the node click but I get this issue my item have child nod when user click the child inside the element event target be not the element I want how do I fix it...
facebookreact
react js display all datum in the text field for particular select i d
Question
the follow be the react render it work successfully when I get the single input tag and error occur error parse error line 59 adjacent jsx element must be wrap in an enclosing tag at param object option option to pass to ...
facebookreact
stateless component performance
Question
be stateless component optimize use react createelement so they be not re render if the prop have not change stateless function if so it would be nice to mention that in the doc because then there be a significant difference between the follow js somecomponent prop return prop hugelist m...
facebookreact
how to use server side rendering in react in expressjs app
Question
documentation doesn t have neither any example nor link to example I want to know how step by step to use react on a server in an expressjs application how component file should look how they be connect to template and layout how expressjs response render template should behave if I render react o...
facebookreact
optimize componentwillreceiveprop and shouldcomponentupdate
Question
react component lifecycle dictate that when new prop roll in componentwillreceiveprop get call where you can calculate the new state and set it without a second cycle afterwards shouldcomponentupdate get call and we can compare prop and state of last cycle with the next one however if state be a product...
facebookreact
way to disable the getinitialstate warning in es6
Enhancement
I really like the convenience of the getinitialstate api in es5 react so I decide to reimplement it in a simple wrapper around react component but I get an annoying warning be there a way to disable this warning since I m do it intentionally and provide my own functionality
facebookreact
render a snap svg image
Question
hi I m new to react I m look use snap svg for render some svg image into some view however I m not quite sure how good to set this up I m use ec6 and the babel transpiler could you explain the good way to add snap svg so that it can render to a view please really look for good practise here rather than I do...
facebookreact
if it s isomorphic code why do you require different code on the server
Question
in the doc you have an example for server side code and an example for client side code I think isomorphic code be suppose to work on both automatically
facebookreact
singleton react component
Question
hey guy so in this application I m write there s a component call help section it s basically a box that show some predefine text about the component the user s mess with I want to be able to tell my help section component which component to show help for as of now I m use flux with some action and a ...
facebookreact
disable a specific warning
Question
will explain the issue briefly instead of extend react component I have a class which get state from a getinitialstate function if exist export default class basecomponent extend react component constructor prop child super prop child this state this getinitialstate this getinit...
facebookreact
do the change of the state always fire the function render
Question
here be the example use strict import react from react export var componenta react createclass componentwillmount this setstate applist this prop applist c this prop c componentwillreceiveprop newprop this setstate applist newprop applist ...
facebookreact
issue with simulate click invoke a function that I be spy on
Question
I be have lot of trouble test out whether click on my render button element be invoke the onclick handler here be my code for the component to be test use strict library dependency const react require react const categoryclearbutton react createclass render return ...
facebookreact
testutil renderintodocument issue with ref
Question
I m quite unsure where this error be come from error invariant violation addcomponentasrefto only a reactowner can have ref you might be add a ref to a component that be not create inside a component s render method or you have multiple copy of react load detail at var folder br b9k...
facebookreact
componentdidupdate fire before reference be trigger or associate
Question
so I feel like componentdidupdate and reference be execute in the wrong order background I m work on a situation where you re in a list of input field with a blank row of field at the bottom when you press enter in any field it move your focus to the next one by talk to a register which keep track of all t...
facebookreact
adapt doc to react rb
Question
I apologize if this be not the good place to ask this but we be get ready to document our ruby react js adapter react rb and would like to take the current react js docs as the starting point and change the example etc to use the ruby dsl syntax I believe that this be within the docs creative common licen...
facebookreact
input element can not focus and can not edit
Question
hi guy I get a problem I write a react component when I render the virtual selector to body in bootstrap modal but I can not edit input or focus online example
facebookreact
react dom and apple tv
Question
I ve be play lately with get react to work for build client server app for the new apple tv so I m open this thread just to start the conversation around the issue in case other people be also look into it for those unfamiliar with the subject the sdk for the new apple tv let you build javascript application that ge...
facebookreact
how to test child prop without trigger do not access prop of a dom node 0 14
Question
I have a component whose job it be to add certain property to its child javascript const parent react createclass dostuff render const child react cloneelement this prop child dostuff this dostuff return child with 0 13 I could test it li...
facebookreact
after call setstate with an es6 class instance as its argument this state become a plain object
Question
when react component getinitialstate method return an es6 class instance everything work fine this state in render mthod have the right type but when I call setstate with es6 class instance as its argument this state become a plain object javascript class state constructor text ...
facebookreact
how to trigger the eventlistener that be register outside of the react component
Question
how to trigger the eventlistener that be register outside of the react component
facebookreact
after server side rendertostre component claim it ismounte
Bug
if you keep a this reference at the componentwillmount lifecycle method of a component that be then render with rendertostre then this ismounted true later on the documentation however claim that server side component aren t really mount since componentdidmount be never call I...
facebookreact
weird component that can not be refer
Question
I use react and material ui for my app here be the part of code render return no name note playerlist map function player index return index 1 player name player note bind this onshowinfo index var player ...
facebookreact
prevent a function to be call from within render
Enhancement
you have a warning in react if you call setstate from within a render method with the check reactcurrentowner current null I would like to add this check to other method of my project because they also trigger rerender or be too expensive the issue I have be that reactcurrentowner be not expose by react...
facebookreact
how to getelementbyid with testutil renderintodocument
Question
I m write some karma test renderer renderintodocument dom reactdom finddomnode renderer since renderintodocument doesn t actually render into document how may I find a component by i d
facebookreact
page mess up facebook github io react html jsx html
Bug
do not know where to post this good since some week the layout look break on google chrome 43 linux screenshot selection 003
facebookreact
stateless function component do not work with native arrow function
Bug
when you blacklist es6 arrowfunction from babel the follow will stop work and you will get the error uncaught typeerror not a constructor js import react from react import reactdom from react dom const app hello world reactdom render document getelementbyid root
facebookreact
press spacebar on a check radio button only fire click in some browser
Bug
1 focus the textbox 2 press shift tab to move focus into the radio button group 3 press spacebar to check the radio button observe a click event in the console 4 press spacebar to redundantly check the radio button in chrome 45 0 2454 85 64 bit osx observe no additional click event ...
facebookreact
modding reacttransitiongroup to work with a wrap component
Question
I m not sure if this be the right repo to ask this question in but I figure I d start somewhere I be work on an app that use react router and redux use a library call react redux which expose a decorator to wrap the component and pass in datum from the store as prop so the component that get pass to reacttrans...
facebookreact
target value sometimes undefine
Bug
I loop my product list with map and create a react component for each item javascript var productlistitem react createclass handleevent function e console log e target value render function return this prop i d thi...
facebookreact
how to unfold child
Question
hi I m write a library which use jsx as an abstract dsl a bit like react router have and or a bit like react canvas have and other primitive to explain my question I will take the example of react router an user could define a customroute component that render to a and...
facebookreact
change event do not fire in ie and edge under certain circumstance
Bug
I have put together this simple example to demonstrate the issue the problem be happen on select element if there be any mouse event listener attach that would trigger a render the onchange handler never get call it look like unlike other browser ie and edge trigger mouse event on th...
facebookreact
checkbox check html attribute not set when underlie prop change
null
when render a checkbox the check html attribute be not be properly set to reflect the check prop of the component the problem seem to be that the setvalueforproperty method link l128 set the check property on the dom node object but this will not update the check html attribute a...
facebookreact
should I set key for conditional component
Question
for example if I have two conditional child like javascript showa showb then should I set key for the child without key when diff between and will the result be remove a remove b insert b what if I have many conditional child like that I have a look at ...
facebookreact
get displayname from instance
null
hi I be extend react component to define component in scala js scala class test extend reactcomponent scala js code val displayname test def render react createelement div in react dev tool I be see no display name for all my component for some reason scala js output n...
facebookreact
what be the differ between parent base context and child base context why the child base context will be lose
Question
I want to use the material ui for my react app I do the same as material ui say here be my code index js var react require react mui require material ui thememanager new mui style thememanager raisedbutton mui raisedbutton var index react createclass childc...
facebookreact
react with facebook s comment
Question
hi I have a page completely write in react so in html template be only a and I have to use comment widget from facebook I come up with js react render create document getelementbyid app function function d s i d var js fjs d getelementsbytagname s 0 ...
facebookreact
question dynamic context
Question
I be try to have locality specify throughout my app I think that use context could be a good solution for this to achieve this I need to let the user dynamically change their locale should dynamically change the context have any negative consequence I have test it and it work but want to make sure there ...
facebookreact
how to import react npm compoent in jsx file
Question
hello I be freshman of react I use gulp to build web asset I compile all jsx file with gulp react to js like this javascript gulp src path appjsx pipe concat app jsx pipe react but now I want to use some react component register in npm such as react iscrol...
facebookreact
callback ref be pass null and then the component again
Bug
I have a super simple react native component with a static root with a callback ref when the component be mount the callback ref be invoke with the root component then when I call setstate the callback ref receive null and then the root component again js class example extend react component ...
facebookreact
be defensive when call method of a syntheticevent inside the pool
Enhancement
as it be know but not document react s syntheticevent be pool this be confuse for many user as they don t understand why the event start to behave strangely when use in an async callback like inside a settimeout a setstate or a render callback there have already be an attempt to solve this p...
facebookreact
yet another invariant violation reactmount two valid but unequal node with the same datum reactid
Bug
I m experience an unexpected error relate to native dom event create in an owner component and trigger by dom element render by own component there s be a number of seemingly relate issue the close being 3790 but this might be a different edge case so I think I d create a new issue for it re...
facebookreact
onmouseleave can be unreliable in chrome
Bug
see this jsfiddle in chrome as you quickly move your mouse up and down the list you ll notice that some get stick in the hover state this work fine in safari and work in chrome if you use a stable key between the hover state I think mouseout somehow isn t fire if the underlying dom node be replace by ...
facebookreact
update datum from rest api
Question
jsx var app react createclass getinitialstate function return datum 1 updatedata function this setstate function state this getdata1 state function state datum return data getdata1 function state cb get fu...
facebookreact
unexpected behavior of findrendereddomcomponentwithtag in react 0 14 beta1
Bug
after migrate from 0 13 to 0 14 beta1 some of our unit test be report false positive failure it seem as though findrendereddomcomponentwithtag be no long able to find element inside component javascript create simple component const test react createclass render return ...
facebookreact
testutil simulate change keydown keypress be not work on a normal input field
Question
I m have a hard time with testutil simulate which be definitely not behave as expect basically I have an input field of type text and I try to change it s content click it and press some key no rocket science but all the editing stuff fail miserably I write a small jsbin to showcase what the compon...
facebookreact
how re render should be do in efficient way while datum change in flux architecture controller
Question
I have a controller which consist of many view in it only my controller be have state and I pass datum to my view through prop now problem be suppose my view depend on number of product say we have more than 100 product and each product consist of number of property relate to it now each property also have th...
facebookreact
rendertostre incorrectly support select s defaultvalue
Bug
here be code for reproduce js var test react createclass render function return this prop item map I I var container document getelementbyid container var code document getelementbyid code var tes...
facebookreact
checksum insert incorrectly for self closing root tag
Bug
this come up while diagnose 4321 issuecomment 120064258 this be because we just look for the closing when add the checksum reactdom rendertostre react createelement img reactdom rendertostre react createelement div null react createelement img
facebookreact
example of use testutil simulate change on a multiple select field
Bug
hi I be try to find a work example of drive a multiple select element use react s testutil for a single select this work fine javascript testutil simulate change el target value 1 for a multiple select field you get an error typeerror array prototype slice call on null or und...
facebookreact
keyboard selection doesn t fire onchange for in firefox
Enhancement
relate bug in bugzilla my workaround for this be to use onkeydown allow the selection to change then call an onchange handler manually but this win t bubble be this something changeeventplugin could support
facebookreact
mouseenter fire on disabled input whereas mouseleave do not
Bug
there be an asymmetry to enterleave event plugin since mouseenter be create from the relativetarget of the mouseout event it fire even though the target be disable since the mouseleave be the inverse I e require that the disabled element fire a mouseout it doesn t fire a mouseleave for the disab...
facebookreact
two different output from terminal and web inspector incorrect view render
Question
I be have trouble with generate my view with reactjs I have these two view which I would like to generate var test1 initial loggedin var test2 notloggedin var initial var isloggedin false var layout react createclass componentwillmount fu...
facebookreact
reacttestutil rename find scry pair to findone findall or similar
Enhancement
outside of the relatively unknown word scry be use it s difficult for someone to tell just by name how these differ the current name seem to be base on the original jx dom scry api usage base on 3278 so likely make more sense internally but as with the person that file 2301 it would be much more di...
facebookreact
in component render method how to get future container s width height
Question
I want to write a layout component width will take 200px width will take the rest width of container how to get the future container s width height
facebookreact
unnecessary encoding of element text content
Enhancement
give the follow piece of code javascript let some text hello world react render some text somewhere react replace the angle bracket quotation mark apostrophe and ampersand with their html entity ie lt gt quot amp etc I don t believe it be necessary to replace the qu...
facebookreact
html tag in component prop
Question
hi I m new in react development and I m not english so I have some difficulty to understand all thing which be possible in react well here I would like to use some html tag in prop for a component for example if I have this component var card react createclass render function ret...
facebookreact
react can mount with but do not update placeholder attribute
Bug
hi I don t really know if this be expect but the follow var hello react createclass render function return hello react render document body will lead to hello it seem that react do not mount the test attribute because it s not standart but ac...
facebookreact
uncaught error unable to find element when update the innerhtml of an option element
Bug
my co worker and I be catch off guard by this behaviour yesterday and I want to see if this be a possible react bug or some misunderstanding on our part basically it seem have more than one part to the innerhtml of an option element and then try to update one of they will throw the error uncaught error i...
facebookreact
bad interaction between react click event handler and native click event handler
Bug
in this repro I create 2 button and only one be render at a time one button s click handler be hook up to react s synthetic click event while the other be hook up to the native click event even though only one button be render at a time a single click be trigger both click event this bug can be hit b...
facebookreact
react s blur may not have relatedtarget in ie 9 11 where it be support
Bug
reactbrowsereventemitter have some handling for onblur and onfocus see l262 l293 react will first check if it can trap focus with a capturing event use addeventlistener if it can t and the browser support focusin then it will use focusin however there be a problem with this pattern i...
facebookreact
component render null always trigger a dom update
Bug
you can see the behavior in this fiddle basically the thing be that the tag be always be update in the dom check the element view with the chrome inspector to see the element update this doesn t happen if the component explicitly return a instead of null
facebookreact
change event be not fire for input type date
Bug
hello it seem like change event be not fire for input type date in mobile firefox on android please try the follow jsfiddle code for example may be I m do something wrong but the above code work well in chrome safari and desktop firefox but not in mobile firefox test in firefox v 37 0 1 on android 5 1...
facebookreact
should I use statefy
Question
hey folk we re implement a set of react component and because of what I explain in the motivation section we create statefy the problem be I m not sure if it s a good practice I m afraid of use it in a large number of component just to find out it would be way well to do it in another way could y...
facebookreact
set attribute style to null break this attribute
Bug
when I assign null to style attribute to reset it it work but only once any follow change of this value do nothing here s a fiddle demonstrating this try to push the button several time this seem like a strange behaviour to I I wouldn t be surprise if my first attempt to set style null fail but ...
facebookreact
replacestate throw away function in 0 13
Bug
I m still learn react so it s possible I m misunderstand something I m try to use react with immutable js and hit a stumbling block by upgrade to react 0 13 there be wiki page on the immutable js repository that explain how to use immutable as a react state and it provide the following example I t...
facebookreact
allow prop to be a plain string specify classname
null
a tiny low impact basically non break change that I find make a big difference to succinctness when render without jsx I ve add a minimal test check lint and submit the cla render declaration tree tend to frequently include instance of div and span which only have classname and nothing else ...
facebookreact
invoke rendertostaticmarkup in render cause ref to break
Bug
demonstrate at open the error console and you should see this uncaught error invariant violation addcomponentasrefto only a reactowner can have ref this usually mean that you re try to add a ref to a component that doesn t have an owner that be be not create inside of another component s ren...
facebookreact
context not update on component mount with react render
Bug
this be tough for I to explain so I create a fiddle to demonstrate it I have a layer portal whatever we be call this pattern that render the child of a component to a new tree off of body via react render I would expect context to also be pass and I ve take special care to make sure the child to be pass to...
facebookreact
allow extraction of primative from reactfragment extract
null
we already allow it but this ensure that we allow it in dev too
facebookreact
node proptype validation hit error with null value
Bug
js var foo react createclass proptype child react proptype node render function return parent this prop child var demo react createclass render function return react render document body warning f...
facebookreact
how do I encapsulate style
Question
hi we be convert a big project write with polymer to react the big problem we face be the lack of encapsulate styling I would like to encapsulate my sass file with encapsulate style among my component in the entire react web site and documentation there be almost no mentioning of style furthermore in chrome ...
facebookreact
call setstate without getinitialstate throw when use purerendermixin
Enhancement
without getinitialstate this state be null which cause this line in shallowequal to throw js if objb hasownproperty key obja hasownproperty key fix be to make shallowequal bail if either argument be falsey or not an object if we want to be very safe
facebookreact
typeerror when parent component be update after uncaught exception in child component s componentwillmount
Bug
expect result render text there be an error actual result uncaught typeerror can not read property unmountcomponent of undefined jsfiddle the code js var parent react createclass getinitialstate function return error false componentwillmount funct...
facebookreact
mozmacosxfontsmoothing be render incorrectly
Bug
the firefox equivalent of webkit font smoothing be moz mac osx font smooth react s serialization of this style prop be incorrect moz mac o s x font smoothing see this fiddle in firefox if the initial state be suppose to enable font smoothing via innerhtml it break but subsequent update whi...
facebookreact
react fail to unmount component from within event handler
Bug
hi when try to unmount my whole app I get some error uncaught typeerror can not read property firstchild of undefined reactmount js 606reactmount findcomponentroot reactmount js 606reactmount findreactnodebyid reactmount js 552getnode reactmount js 128executedispatch eventpluginutil js 109si...
facebookreact
call super method of react component child
null
I have inheritance in my app show below I be use babeljs transpiler 6to5 and call super method generate an exception js class component extend react component class mycomponent extend component componentdidupdate super componentdidupdate here error could not call an unde...
facebookreact
jsxtransformer break when create source map and defineproperty not available
Bug
if jsxtransformer be call with sourcemap true as an option but the javascript environment do not have object defineproperty the transformation die here with an object doesn t support property or method defineproperty exception the list of original source object defineproper...
facebookreact
warn when react dom modify by not react
Enhancement
as discuss in issuecomment 75181038 a complementary improvement be to turn on a mutation observer in dev and warn of someone other than react modify the dom and or if dom node appear without a data reactid thus indicate an extension or some other script be do fancy magic
facebookreact
createnodesfrommarkup render with global document
Bug
apparently we support render into iframe petehunt but we always render new markup into the global document and then move render element into the iframe document afterwards jsdom throw wrong document if you try to do this but browser don t seem to mind however apart from perhaps not be very nice for var...
facebookreact
strict proptype mode
Duplicate
it would be nice to be able to set a flag that will trigger invariant warning any time a prop be reference from or pass into a component but that be not declare in proptype
facebookreact
this forceupdate crash when a component be not mount
Duplicate
not sure if it be a bug or just general confusion try only with 0 12 2 not with master this forceupdate crash when a component be not mount which in itself make sense I d say however if you call this forceupdate directly in componentwillmount it doesn t crash which suggest that it ...
facebookreact
reactmount nodecache be repopulate with purge node that be focus at unmount
Bug
if you unmount a currently focus node nodecache be repopulate after be purge and unless that specific i d be revisit later it will remain there forever this be mostly likely due to the focus selection restoration phase after reconciliation repro nodecache be output into the console
facebookreact
question about immutable datum and react
Question
it may sound like a noob question or just crazy but I ask anyway so dom diff may be replace with immutable datum diff it s much fast and sane if we require of state to be immutable can not we drop dom diff entirely and all this virtual dom altogether most of react code actually it will require...
facebookreact
q transfer state from server
Question
I wonder if it s possible to transfer state and or prop from server to client I imagine way like stringify parse json to achieve it how to do that properly or I should use ajax for initial state even in isomorphic webapp
facebookreact
when return null tag be always rerendere
Bug
tl dr if you have a component that return null and it rerender the noscript tag be unmounted and a new one be create because shouldupdatereactcomponent get and null and return false this come out of some internal component that be break after the most recent update I haven t go to see if this...