Reputation: 539
Similar to this question, my App entry looks like
AppRegistry.registerComponent('SnsAdvertiser', () => Advertiser)
const { element, getStyleElement } = AppRegistry.getApplication('App', { string: 'hello!' })
Instead of using runApplication, I am using getApplication which is
getApplication: (key: string, params: AppParams) => ({ element, getStyleElement })
A web-only method for server-side rendering to HTML and CSS. It returns an object containing the given application’s element and getStyleElement function to get styles once the element is rendered.
The second argument of getApplication is params, but when I pass this in and log my props in my component, I get an empty object.
I'm wondering how I can pass props in a server environment.
Upvotes: 1
Views: 416