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

Add Support for using React in fragments when using the Fragments Toolkit

    Details

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              marta.elicegui Marta Elicegui
              Recent user:
              Marta Elicegui
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Packages

                Version Package