I’m looking at the short sample that Kadira put up for using flow router with Meteor 1.3 and react. I’ve just started to transition to Meteor 1.3 and I’m just not sure if understand the syntax in this one example and hoping someone can just quickly give me an explanation.
In the app.jsx it has:
import React from 'react';
export const Layout = ({content}) => ( <div> <h1>My App</h1> <hr /> <div>{content}</div> </div> );
And in the routes.jsx
FlowRouter.route("/", { action() { mount(Layout, { content: (<Welcome name="richard" />), test: (<Welcome name="test" />) }); } });
I’m wondering. Why is the parameter for Layout… {content}. Why the parenthesis. Is it because then its called in the flow router its passed what looks like an anonymous object? And does it some how convert that object key as a variable called “content” so that in the jsx return it can be used as {content}?