Make rendering React.js components in Phoenix easy
Full Changelog: https://github.com/geolessel/react-phoenix/compare/v1.3.0...v1.3.1
phoenix_html
3.0yarn
usersFull Changelog: https://github.com/geolessel/react-phoenix/compare/v1.2.0...v1.3.0
react_component/3
accepts html_element
By default, react_component renders the react component inside a div container. If you pass a value for html_element
as an option to react_component/3
, it will render the component inside the specified HTML element. For example, to render the component in a span instead of a div, you can run
react_component("MyComponent", %{}, html_element: "span")
react_component/3
passes all other options to the HTML element
Anything else passed into react_component/3
will be passed through directly to the component's HTML output. This could be a class name, styles, or anything else.
react_component("MyComponent", %{aProp: "hello"}, style: "border-bottom: 1px solid #888")
Simple security updates on dependency
This release corresponds to changes in Phoenix 1.4.
@deprecated
attribute to ReactPhoenix.react_component
mod
from mix filemix format
BREAKING CHANGE!
This release removes all code that was available to support server-side rendering. It was causing more trouble than it was worth in the end. More experiments on my end will continue but for a public release, it needed to be gone.
More info can be seen in this thread in Issue #10 (https://github.com/geolessel/react-phoenix/issues/10#issuecomment-347092652).