Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-102280

As a Fragment Developer I would like to get support for using React in fragments when using the Fragments Toolkit



      A common trend and demand when creating Fragments is to have the possibility of using React or other frameworks to compose them. In its current state, neither the Fragments Toolkit nor the default Fragments Server capabilities support this option in an ergonomic way.

      The goal of this epic is to add support for React fragments inside the Fragments Toolkit as an initial step towards a more general solution.

      Acceptance Criteria

      • React Fragments can be generated from the Fragments Toolkit
      • Generated React fragments share the same React instance used in Liferay DXP

      Identified Problems

      • Currently, fragments assume 1 JS file per fragment. This means no additional dependencies can be provided unless they're already present and being served through some other module.
      • Providing any type of build-step will make the toolkit and UI fall out of sync. It won't be possible to easily edit fragments through the UI, as they'll be likely seeing transpiled code
      • An understandable expectation of this is that any npm package and framework can be used to generate a fragment, and not just React or not just DXP modules. This might not be technically possible at the moment unless we use some alpha version of our tooling or drop the Acceptance Criteria about "reusing React" among fragments.

      An initial exploration of the problem space can be found in the document LPS-102280 Add Support for using React in fragments


          Issue Links



              pablo.molina Pablo Molina
              marta.elicegui Marta Elicegui
              Recent user:
              Wesley Gong
              Participants of an Issue:
              0 Vote for this issue
              4 Start watching this issue




                  Version Package