|
|
|
|
|
by peterhunt
4738 days ago
|
|
This is one of our top priorities and we're hoping to have it fixed by the next release. While I don't know all the subtleties of your use case, I've found that by simply swapping your IDs with class selectors this hasn't been a problem either for Selenium or for CSS. It's pretty straightforward to convert an existing codebase with codemod: https://github.com/facebook/codemod If you're still curious about React, feel free to drop us a line at https://groups.google.com/forum/#!forum/reactjs with any questions or concerns you might have. Thanks for giving React a shot. |
|
First of all, can't tell you how awesome it feels to get a response from someone working on the library.
Your fix won't work for me unfortunately, changing id's to classes in your CSS inherently changes the "weight" of the selectors, which can cause the wrong CSS rules to be applied (especially if you have old rules hanging around from iterating on your interface a couple times).
Another thing that you guys might have missed about why writing IDs are shitty: They pollute window's namespace. If I have an element with id "narc", then window.narc returns that element. Which can lead to confusing JS situations.
Anyways, glad to hear you guys are moving ahead and improving your library! I will try it out again in a few months, love the work so far.