3/1/2024 0 Comments Importing react fragmentMy courses aren't like other courses you won't sit and watch me code for hours and hours. It's a beginner-friendly course with one goal: to help you build your intuition of how React works, so that you can use it to build rich, dynamic web applications. It's hard to overstate how much more fun React became for me!įor the past two years, I've been developing an interactive self-paced online course called The Joy of React. I found I didn't have to keep memorizing arbitrary rules instead, I could rely on my intuition. I began to understand why React works the way it does. I've had a series of epiphanies, and each time, my mental model has become more sturdy, more robust. Since then, I've been building my mental model of React one puzzle piece at a time. I started using React back in 2015, and I remember thinking: “This is friggin’ cool, but I have no idea how this works.” □ It takes a while for everything to click. React has always been pretty tricky to become truly comfortable with, and it's especially true nowadays with hooks. Why, exactly, do we need to provide a unique key? How come we can't access state after changing it? And why on earth is useEffect so dang finicky?! Fragment Set StructureĬollection.json: a text file that describes the Fragment Set.Link to this headingDeveloping an intuitionĪt first glance, a lot of the fixes we've seen in this tutorial seem pretty arbitrary. Great! You successfully deployed a Fragment Set. The Set should appear in the list.įor Liferay DXP 7.1 and 7.2, instead navigate to Site → Site Builder → Page Fragments under the Product Menu to get to the Fragments page. Open the Site Menu ( ) and go to Design → Fragments. ? Liferay host & port ? Username Password cd sample-liferay-fragmentsĪnswer the prompts. Alternatively, you can import the Fragment Set manually. Import the Fragment Set to your Liferay instance by invoking the yarn run import command in the project’s root folder (e.g., sample-liferay-fragments). Then, follow these steps to import the sample Fragment Set to Liferay: When prompted, change the password to learn. Sign in to Liferay at Use the email address and the password test. Start a new Liferay instance by running docker run -it -m 8g -p 8080:8080 liferay/portal:7.4.3.102-ga102 For example, since you named the project Sample Liferay Fragments, the generator created a project folder called sample-liferay-fragments. The generator creates each project in a folder derived from the project name. Portal versions, please check the generator documentation before using them:Ĭreate src/sample-collection/collection.jsonĬreate src/sample-collection/sample-fragment/index.htmlĬreate src/sample-collection/sample-fragment/main.jsĬreate src/sample-collection/sample-fragment/styles.cssĬreate src/sample-collection/sample-fragment/fragment.jsonĬreate src/sample-collection/sample-fragment/configuration.jsonĬreate src/sample-collection/sample-fragment-with-new-editables/index.htmlĬreate src/sample-collection/sample-fragment-with-new-editables/main.jsĬreate src/sample-collection/sample-fragment-with-new-editables/styles.cssĬreate src/sample-collection/sample-fragment-with-new-editables/fragment.jsonĬreate src/sample-collection/sample-fragment-with-new-editables/configuration.jsonĬreate src/sample-collection/sample-fragment-with-react/index.htmlĬreate src/sample-collection/sample-fragment-with-react/main.jsĬreate src/sample-collection/sample-fragment-with-react/styles.cssĬreate src/sample-collection/sample-fragment-with-react/fragment.jsonĬreate src/sample-collection/sample-fragment-with-react/configuration.jsonĬongratulations on generating your Fragments Project! Warning: some of these fragments are not compatible all ? Project name (Sample Liferay Fragments) For this example, accept the default project name by clicking enter. Launch the project generator by executing the yo liferay-fragments command: yo liferay-fragments Here’s how to generate a Fragments Project: If you’re in the liferay-x2y6 project folder, exit it (e.g., cd. Make sure to create new Fragments projects in their own location, outside of any existing Fragments projects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |