{"query_id": "q-en-react-0224e72f53068cfce1eb60f4e6918116817d50f053dcb5f8b5a759638f7bc467", "query": "``` accept acceptCharset accessKey action allowFullScreen allowTransparency alt async autoComplete autoFocus autoPlay cellPadding cellSpacing charSet checked classID className colSpan cols content contentEditable contextMenu controls async autoComplete autoFocus autoPlay cellPadding cellSpacing charSet challenge checked classID className colSpan cols content contentEditable contextMenu controls coords crossOrigin data dateTime defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min multiple muted name noValidate open optimum pattern placeholder headers height hidden high href hrefLang htmlFor httpEquiv icon id keyParams keyType label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min multiple muted name noValidate open optimum pattern placeholder poster preload radioGroup readOnly rel required role rowSpan rows sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcSet start step style tabIndex target title type useMap value width wmode", "positive_passages": [{"docid": "doc-en-react-c106a437ddd3bd1957c6502f10dcab059cffc9005b0db8685ba1254d6e535341", "text": "I'm using tag to generate client certificates and I'm missing challenge and keytype attributes.\nIt would be cool if React gives us the opportunity to use different syntax for attrs and props: And may be: There would be no need to know what tags React supporting.\nThere's more planned to alleviate the issues around unknown elements and properties, but we're not there yet. We have no plans on to use different syntax. Adding the additional attributes here seems totally reasonable.\nWill try to take a stab at this. I assume this is as simple as adding those props to , and then adding tests. Is that correct or am I missing anything significant?\nIt's even easier than that since we don't really have tests for the attributes. But do actually test in a couple browsers that changing values across renders is reflected appropriately (usually the issues is property vs attribute).\nYou're quick, guys. Thanks in advance!\nBy 'across renders' you mean simply triggering a re-render (by changing the value)?\nYea. I usually just make a simple component with a button that toggles state so I can test with multiple values easily.\nGreat. Thx.\nI missed a detail in docs. Although, I don't need it, there's an additional attribute, keyparams, which is required with \"dsa\" and \"ec\" keytypes. See\nHave this working, though I'm not entirely clear if these should be , or . I wasn't able to deduce the meaning of these from the code. Is there someplace I can read up on these?\nThose are used to determine if we do or if we do when updating. means it doesn't matter and browsers should work with either. Currently we use properties in that case but we may switch that in the future. indicate that they must be set & removed as a property or an attribute.\nThanks. That makes sense. Had to use to get it to work properly across Chrome/FF/Safari. Your testing method great as well. Thx for your help", "commid": "react_issue_3961", "tokennum": 430}], "negative_passages": []} {"query_id": "q-en-react-02695d84dd62ba8e5cc7d7d1498b6382aac82412daaaa94e7b6dce768cee0bd5", "query": "expect(log).toEqual([]); }); it('should pass previous state to shouldComponentUpdate even with getDerivedStateFromProps', () => { const divRef = React.createRef(); class SimpleComponent extends React.Component { constructor(props) { super(props); this.state = { value: props.value, }; } static getDerivedStateFromProps(nextProps, prevState) { if (nextProps.value === prevState.value) { return null; } return {value: nextProps.value}; } shouldComponentUpdate(nextProps, nextState) { return nextState.value !== this.state.value; } render() { return
value: {this.state.value}
; } } const div = document.createElement('div'); ReactDOM.render(, div); expect(divRef.current.textContent).toBe('value: initial'); ReactDOM.render(, div); expect(divRef.current.textContent).toBe('value: updated'); });
it('should call getSnapshotBeforeUpdate before mutations are committed', () => { const log = [];", "positive_passages": [{"docid": "doc-en-react-af6422597abfc3705e1e016cf37e5dbfbfdcf0923b24267ad3eb49d20f8d6064", "text": "