Comments (12)
I changed that in a pull request that was merged to master, but the commits have not yet been included in a release: #15
The PR also changed checked
to defaultChecked
for the same reason you mentioned.
from react-magic.
Are you using react-magic or HTMLtoJSX?
Thanks for the reminder @ssorallen, I'll cut a release shortly. I was going to bundle some other bug fixes but I can do those separately.
from react-magic.
Just pushed out an update to HTMLtoJSX. As for react-magic, it should already be up to date.
from react-magic.
@Daniel15, where does HTMLtoJSX live? I thought it was part of react-magic.
from react-magic.
HTMLtoJSX is the package on NPM, and is one portion of react-magic. It handles converting HTML to JSX, that's it.
React-magic is HTMLtoJSX + automatically converting the whole page to a React component + handling AJAX loading page transitions (ie. clicking URLs). React-magic is more experimental :P
The readme in this repo explains what react-magic is, whereas README-htmltojsx.md
(and the readme on NPM) explain HTMLtoJSX.
from react-magic.
In short, this is react-magic: https://github.com/reactjs/react-magic/blob/master/src/magic.js
from react-magic.
Cool, thanks for the explanation. I see the new 0.2.1 package on NPM.
from react-magic.
defaultValue will not work on all types including type="submit" according to the react team it´s a button and not editable by a user. ref: facebook/react#2673 (comment)
Is it possible to work around this in HTMLtoJSX? I think and I have the issue that a submit button value can change between two diffing HTML elements.
from react-magic.
Good point on the value of a <input type="submit">
. It seems to work fine setting defaultValue
though, even if it's not semantically meaningful.
from react-magic.
If setting defaultValue
rather than value
on buttons doesn't work properly, I'd suggest opening a separate issue for it. Thanks!
from react-magic.
@hallgren Aha, I see what you mean by the problem now. First page has an <input type="submit" value="Submit">
and the second one has <input type="submit" value="Click Me">
, and the value would not be reflected in the rendered DOM because HTMLtoJSX is setting defaultValue
instead of value
.
from react-magic.
I don´t know if it´s possible to update the value on the submit button due to how react.js handles the <input type="submit">
button component.
It work for the <button type="submit">text</button>
tag.
from react-magic.
Related Issues (20)
- Ability to preload links on hover, or expose enough of an API for users to implement. HOT 1
- Comparison to TurboLinks
- Getting hit with wall of errors HOT 3
- Convert hyphenated attributes into camelCase HOT 1
- [HtmlToJsx] View logic? F.e., how do we loop through items in an HTML view? HOT 2
- onclick attribute not getting renamed to onClick HOT 1
- Feature Request : Make this work in a web worker HOT 1
- HTMLtoJSX page is broken HOT 3
- HTML to JSX is broken HOT 5
- Autofocus isn't camel-cased HOT 2
- Change React.createClass to ES class
- feature request: serialize nodes and attributes to custom code
- HTMLtoJSX, better document default behavior
- SVG: incorrect gradientunits attribute
- complex style prop not parsed correctly
- White-space conversion on text nodes or inline elements HOT 2
- react 16 HOT 1
- Reactmagic site have "<" unexcpected error
- Add option to output Functional component (as well as import and export statement)
- ref value in react
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-magic.