Ideas for Arc XP

A way for a React component to know if it is being rendered in "design time" by Page Builder editor

Often times we add default prop types for a component to render something, at Page Buider design page (and see some data to get a better idea of the layout), but when a component is being rendered for a final user, the default proptypes must not be used (aka they are rendered if no original data is passed). So there should be a a way, some kind of runtime property that React components to check to see if they are rendered by Page Builder (and only then, use the default prop types data to render data).

  • Guest
  • Mar 6 2020
  • Already exists
Categories Editor
I need it... Not sure—just thought it was cool!