I spent day 2 coding furtively on the tube and did not really blog. I mainly tried to move each component away from styled component and to SASS. It’s been challenging, as initially I had the Button component set up so that I could pass additional classes to the styled component and they would get added to the defualt btn class
`export default ({ className, …props }) => <Btn type=”button” className={`btn ${className? className:”}} {...props}/>;
I’ve now lost the option to pass in additional classes…
In the meantime, I am now getting the error `Warning: Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML` which I never encountered before.
Apparently `This rule applies when innerHTML
prop for a React DOM element is used.
innerHTML
prop is risky because it is easy to expose your users to a cross-site scripting (XSS) attack. React provides dangerouslySetInnerHTML
as a replacement for innerHTML
prop to remind yourself that it is dangerous.`
This is fun 🙂 It feels like I’m living on edge…
Then I stumbled on all the methods which have been renamed https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html
This refactoring is proving painful, I guess it’s ever easy, I might not refactor that now though…
Recent Comments