I know that the react_on_rails and the react-rails gems have ways of passing data to react components. For example, you can do things like this: <%= react_component("HelloWorld", props: @some_props) %>.
Now that we can do rails new myapp --webpack=react and have javascript packs, how can I pass data, or props, from my rails views to my react components? Can I do something like: <%= javascript_pack tag 'hello_react', data: @users %>?
I don't want to have to build out an api, and it seems there isn't a preferred way to accomplish what I want. The only feasible method I have seen so far was in this article.