Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Build Applications with Meteor

You're reading from   Build Applications with Meteor Isomorphic JavaScript web development

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781787129887
Length 388 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Dobrin Ganev Dobrin Ganev
Author Profile Icon Dobrin Ganev
Dobrin Ganev
Arrow right icon
View More author details
Toc

Building the application components

Let's start building the application from top to bottom. The first two entries in the app are the index.html and index.js files. You can name them main.js or app.js or anything you want. I have a preference of naming index (starting with lowercase) as the first entry of any directory in my apps. That said, all React components should be capitalized when you import them; otherwise, React will thread them as HTML tags. To keep it intuitive, you can have the component names and their files' names capitalized.

In the index.html file, we can have our root DOM element:

<head>
<title>Shopping Cart</title>
</head>
<body>
<div id="root"></div>
</body>

We have a pretty simple HTML with only the <head> and <body> tags, and one <div> that will be the root of the parent top-level component, App.

In...

You have been reading a chapter from
Build Applications with Meteor
Published in: May 2017
Publisher: Packt
ISBN-13: 9781787129887
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime