How to use the vtex.render-runtime.withRuntimeContext function in vtex

To help you get started, weā€™ve selected a few vtex examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vtex-apps / store / react / components / PageViewPixel.js View on Github external
componentDidMount() {
    this.sendPageViewEvent()
  }

  componentDidUpdate(prevProps) {
    if (prevProps.runtime.route.path !== this.props.runtime.route.path) {
      this.sendPageViewEvent()
    }
  }

  render() {
    return null
  }
}

export default Pixel(withRuntimeContext(PageViewPixel))
github vtex-apps / store / react / OrderPlacedWrapper.js View on Github external
const titleTag = "Order Placed"

    return(
       this.getData(orderGroupId)}
      >
        
          <title>{titleTag}</title>
        
        {React.cloneElement(this.props.children, this.props)}
      
    )
  }
}

export default withRuntimeContext(OrderPlacedWrapper)