<Root>
component in the /packages/my-first-theme/src/index.js
file so that it returns an <h1>
element containing the text “Hello Frontity"./packages
directory and refreshes the browser if it detects any changes. Since we have changed the content of a file within the /packages
directory the content in the browser should automatically update.<Root>
component into its own file which we'll put in a separate directory.components
inside /packages/my-first-theme/src
. This is where we will create all the component files for our theme. Then, inside /packages/my-first-theme/src/components
create a new file called index.js
.index.js
file in the src
directory one level below in the structure).<Root>
component as before but moved into the new file and then exported. We also need to import React into our new file./packages/my-first-theme/src/index.js
which you can modify as follows: