You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The initial problem occurs when I changed my JSS app to fit the Sitecore-first workflow. After that I created a Rendering Parameter in Sitecore and wanted to use it in the corresponding JSS component. It led to the error stating that the props.params are undefined. I asked in Slack and @kamsar pointed me out that the Layout Service won't return my params until I set a value. That worked but initially there is no value wanted.
Describe the solution you'd like
I would like to have props.params checked for defined by default, so the JSS component works even if there is no value set.
Additional information
I use JSS version 11.0.2 (with React) and a Sitecore 9.0.1 instance.
The text was updated successfully, but these errors were encountered:
annaf-dev
changed the title
Check props.params for defined by default
Check props.params for defined by default
Apr 2, 2019
Is your feature request related to a problem? Please describe.
The initial problem occurs when I changed my JSS app to fit the Sitecore-first workflow. After that I created a Rendering Parameter in Sitecore and wanted to use it in the corresponding JSS component. It led to the error stating that the
props.params
are undefined. I asked in Slack and @kamsar pointed me out that the Layout Service won't return my params until I set a value. That worked but initially there is no value wanted.Describe the solution you'd like
I would like to have
props.params
checked for defined by default, so the JSS component works even if there is no value set.Additional information
I use JSS version 11.0.2 (with React) and a Sitecore 9.0.1 instance.
The text was updated successfully, but these errors were encountered: