react_phoenix v1.2.0 Release Notes

Release Date: 2020-01-21 // over 4 years ago
  • ๐Ÿ”– Version 1.2.0

    ๐Ÿ”„ Changes

    • Replace eval call in javascript (#46)

    Chores

    • โšก๏ธ Update dev dependencies (#47)

Previous changes from v1.1.0

  • v1.1.0

    โž• Added

    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")