Edit documentation Edit document

Components features

Every component, inherited from GHComponent has these features:

  • Every component has environment variable inherited from GHComponent with 'client' and 'server' values.
this.invironment === 'client' || 'server';

This can be used, if you need to run some code only on server side (html rendering for example) or only on client (slider initialisation, event listeners etc.)

  • Every component both on server and client have GudHub library. On the server it's always has instance (created with key from config). On client, you can create instance for you purposes any time you need.
  • You can add 'to-be-removed' attribute for component, and it will be removed on server side, and you will get only inner html of it on client. Be aware, that this feature will break all component functionality and will remove