100% found this document useful (1 vote)
27 views

Learning React: Modern Patterns for Developing React Apps, 2nd Edition (eBook PDF) pdf download

The document is an overview of the book 'Learning React: Modern Patterns for Developing React Apps, 2nd Edition' by Alex Banks and Eve Porcello, which aims to teach developers the React library and modern JavaScript techniques. It covers foundational concepts, state management, testing, and server rendering, and does not assume prior knowledge of React or advanced JavaScript. The book is designed to provide a strong foundation for building real-world React applications and includes supplemental materials available for download.

Uploaded by

kanavazamirn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
27 views

Learning React: Modern Patterns for Developing React Apps, 2nd Edition (eBook PDF) pdf download

The document is an overview of the book 'Learning React: Modern Patterns for Developing React Apps, 2nd Edition' by Alex Banks and Eve Porcello, which aims to teach developers the React library and modern JavaScript techniques. It covers foundational concepts, state management, testing, and server rendering, and does not assume prior knowledge of React or advanced JavaScript. The book is designed to provide a strong foundation for building real-world React applications and includes supplemental materials available for download.

Uploaded by

kanavazamirn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Learning React: Modern Patterns for Developing

React Apps, 2nd Edition (eBook PDF) install


download

https://ebookluna.com/product/learning-react-modern-patterns-for-
developing-react-apps-2nd-edition-ebook-pdf/

Download more ebook from https://ebookluna.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Learning React: Modern Patterns for Developing React Apps,


2nd Edition (eBook PDF)

https://ebookluna.com/product/learning-react-modern-patterns-for-
developing-react-apps-2nd-edition-ebook-pdf/

ebookluna.com

(eBook PDF) Instructional Patterns: Strategies for


Maximizing Student Learning

https://ebookluna.com/product/ebook-pdf-instructional-patterns-
strategies-for-maximizing-student-learning/

ebookluna.com

(eBook PDF) Reflections: Patterns for Reading and Writing


2nd Edition

https://ebookluna.com/product/ebook-pdf-reflections-patterns-for-
reading-and-writing-2nd-edition/

ebookluna.com

(eBook PDF) Patterns of Modern Chinese History by Charles


A. Desnoyers

https://ebookluna.com/product/ebook-pdf-patterns-of-modern-chinese-
history-by-charles-a-desnoyers/

ebookluna.com
Modern Sample Preparation for Chromatography, 2nd Edition
Serban Moldoveanu - eBook PDF

https://ebookluna.com/download/modern-sample-preparation-for-
chromatography-2nd-edition-ebook-pdf/

ebookluna.com

(Original PDF) Learning for Teaching, Teaching for


Learning with Student Resour

https://ebookluna.com/product/original-pdf-learning-for-teaching-
teaching-for-learning-with-student-resour/

ebookluna.com

(eBook PDF) Developing Content Area Literacy: 40


Strategies for Middle and Secondary Classrooms 2nd Edition

https://ebookluna.com/product/ebook-pdf-developing-content-area-
literacy-40-strategies-for-middle-and-secondary-classrooms-2nd-
edition/
ebookluna.com

Business Communication: Developing Leaders for a Networked


World 2nd Edition Peter W. Cardon - eBook PDF

https://ebookluna.com/download/business-communication-developing-
leaders-for-a-networked-world-ebook-pdf/

ebookluna.com

(eBook PDF) Patterns of World History Combined Volume 2nd


edition

https://ebookluna.com/product/ebook-pdf-patterns-of-world-history-
combined-volume-2nd-edition/

ebookluna.com
c. Typechecking for React Applications
i. PropTypes
ii. Flow
iii. TypeScript
d. Test-Driven Development
i. TDD and Learning
e. Incorporating Jest

i. Create React App and Testing


f. Testing React Components
i. Queries
ii. Testing Events
iii. Using Code Coverage
12. 11. React Router
a. Incorporating the Router
b. Router Properties
i. Nesting Routes
c. Using Redirects
i. Routing Parameters
13. 12. React and the Server
a. Isomorphic Versus Universal
i. Client and Server Domains
b. Server Rendering React
c. Server Rendering with Next.js
d. Gatsby
e. React in the Future
14. Index
Learning React
SECOND EDITION

Modern Patterns for Developing React Apps

Alex Banks and Eve Porcello


Learning React

by Alex Banks and Eve Porcello

Copyright © 2020 Alex Banks and Eve Porcello. All rights reserved.

Printed in the United States of America.

Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North,


Sebastopol, CA 95472.

O’Reilly books may be purchased for educational, business, or sales


promotional use. Online editions are also available for most titles
(http://oreilly.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or
corporate@oreilly.com.

Acquisitions Editor: Jennifer Pollock

Development Editor: Angela Rufino

Production Editor: Kristen Brown

Copyeditor: Holly Bauer Forsyth

Proofreader: Abby Wheeler

Indexer: Judith McConville

Interior Designer: David Futato

Cover Designer: Karen Montgomery


Illustrator: Rebecca Demarest

May 2017: First Edition


June 2020: Second Edition
Revision History for the Second Edition
2020-06-12: First Release

See http://oreilly.com/catalog/errata.csp?isbn=9781492051725 for


release details.

The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.


Learning React, the cover image, and related trade dress are trademarks
of O’Reilly Media, Inc.

The views expressed in this work are those of the authors, and do not
represent the publisher’s views. While the publisher and the authors
have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the
authors disclaim all responsibility for errors or omissions, including
without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions
contained in this work is at your own risk. If any code samples or other
technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your
responsibility to ensure that your use thereof complies with such
licenses and/or rights.

978-1-492-05172-5
[LSI]
Preface

This book is for developers who want to learn the React library while
learning the latest techniques currently emerging in the JavaScript
language. This is an exciting time to be a JavaScript developer. The
ecosystem is exploding with new tools, syntax, and best practices that
promise to solve many of our development problems. Our aim with this
book is to organize these techniques so you can get to work with React
right away. We’ll get into state management, React Router, testing, and
server rendering, so we promise not to introduce only the basics and
then throw you to the wolves.

This book does not assume any knowledge of React at all. We’ll
introduce all of React’s basics from scratch. Similarly, we won’t
assume that you’ve worked with the latest JavaScript syntax. This will
be introduced in Chapter 2 as a foundation for the rest of the chapters.

You’ll be better prepared for the contents of the book if you’re


comfortable with HTML, CSS, and JavaScript. It’s almost always best
to be comfortable with these big three before diving into a JavaScript
library.

Along the way, check out the GitHub repository. All of the examples
are there and will allow you to practice hands-on.

Conventions Used in This Book


The following typographical conventions are used in this book:

Italic
Indicates new terms, URLs, email addresses, filenames, and file
extensions.

Constant width
Used for program listings, as well as within paragraphs to refer to
program elements such as variable or function names, databases,
data types, environment variables, statements, and keywords.

Constant width bold


Shows commands or other text that should be typed literally by the
user.

TIP
This element signifies a tip or suggestion.

NOTE
This element signifies a general note.

WARNING
This element indicates a warning or caution.
Using Code Examples
Supplemental material (code examples, exercises, etc.) is available for
download at https://github.com/moonhighway/learning-react.

If you have a technical question or a problem using the code examples,


please send email to bookquestions@oreilly.com.

This book is here to help you get your job done. In general, if example
code is offered with this book, you may use it in your programs and
documentation. You do not need to contact us for permission unless
you’re reproducing a significant portion of the code. For example,
writing a program that uses several chunks of code from this book does
not require permission. Selling or distributing examples from O’Reilly
books does require permission. Answering a question by citing this
book and quoting example code does not require permission.
Incorporating a significant amount of example code from this book into
your product’s documentation does require permission.

We appreciate, but generally do not require, attribution. An attribution


usually includes the title, author, publisher, and ISBN. For example:
“Learning React by Alex Banks and Eve Porcello (O’Reilly).
Copyright 2020 Alex Banks and Eve Porcello, 978-1-492-05172-5.”

If you feel your use of code examples falls outside fair use or the
permission given above, feel free to contact us at
permissions@oreilly.com.

O’Reilly Online Learning


NOTE
For more than 40 years, O’Reilly Media has provided technology and business
training, knowledge, and insight to help companies succeed.

Our unique network of experts and innovators share their knowledge


and expertise through books, articles, and our online learning platform.
O’Reilly’s online learning platform gives you on-demand access to live
training courses, in-depth learning paths, interactive coding
environments, and a vast collection of text and video from O’Reilly
and 200+ other publishers. For more information, visit
http://oreilly.com.

How to Contact Us
Please address comments and questions concerning this book to the
publisher:

O’Reilly Media, Inc.

1005 Gravenstein Highway North

Sebastopol, CA 95472

800-998-9938 (in the United States or Canada)

707-829-0515 (international or local)

707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and
any additional information. You can access this page at
https://oreil.ly/learningReact_2e.

Email bookquestions@oreilly.com to comment or ask technical


questions about this book.

For news and information about our books and courses, visit
http://oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia

Acknowledgments
Our journey with React wouldn’t have started without some good old-
fashioned luck. We used YUI when we created the training materials
for the full-stack JavaScript program we taught internally at Yahoo.
Then in August 2014, development on YUI ended. We had to change
all our course files, but to what? What were we supposed to use on the
front-end now? The answer: React. We didn’t fall in love with React
immediately; it took us a couple hours to get hooked. It looked like
React could potentially change everything. We got in early and got
really lucky.

We appreciate the help of Angela Rufino and Jennifer Pollock for all
the support in developing this second edition. We also want to
acknowledge Ally MacDonald for all her editing help in the first
edition. We’re grateful to our tech reviewers, Scott Iwako, Adam
Rackis, Brian Sletten, Max Firtman, and Chetan Karande.

There’s also no way this book could have existed without Sharon
Adams and Marilyn Messineo. They conspired to purchase Alex’s first
computer, a Tandy TRS 80 Color Computer. It also wouldn’t have
made it to book form without the love, support, and encouragement of
Jim and Lorri Porcello and Mike and Sharon Adams.

We’d also like to acknowledge Coffee Connexion in Tahoe City,


California, for giving us the coffee we needed to finish this book, and
its owner, Robin, who gave us the timeless advice: “A book on
programming? Sounds boring!”
Chapter 1. Welcome to React

What makes a JavaScript library good? Is it the number of stars on


GitHub? The number of downloads on npm? Is the number of tweets
that ThoughtLeaders™ write about it on a daily basis important? How
do we pick the best tool to use to build the best thing? How do we
know it’s worth our time? How do we know it’s good?

When React was first released, there was a lot of conversation around
whether it was good, and there were many skeptics. It was new, and the
new can often be upsetting.

To respond to these critiques, Pete Hunt from the React team wrote an
article called “Why React?” that recommended that you “give it
[React] five minutes.” He wanted to encourage people to work with
React first before thinking that the team’s approach was too wild.

Yes, React is a small library that doesn’t come with everything you
might need out of the box to build your application. Give it five
minutes.

Yes, in React, you write code that looks like HTML right in your
JavaScript code. And yes, those tags require preprocessing to run in a
browser. And you’ll probably need a build tool like webpack for that.
Give it five minutes.

As React approaches a decade of use, a lot of teams decided that it’s


good because they gave it five minutes. We’re talking Uber, Twitter,
Airbnb, and Twitter—huge companies that tried React and realized that
it could help teams build better products faster. At the end of the day,
isn’t that what we’re all here for? Not for the tweets. Not for the stars.
Not for the downloads. We’re here to build cool stuff with tools that
we like to use. We’re here for the glory of shipping stuff that we’re
proud to say we built. If you like doing those types of things, you’ll
probably like working with React.

A Strong Foundation
Whether you’re brand new to React or looking to this text to learn
some of the latest features, we want this book to serve as a strong
foundation for all your future work with the library. The goal of this
book is to avoid confusion in the learning process by putting things in a
sequence: a learning roadmap.

Before digging into React, it’s important to know JavaScript. Not all of
JavaScript, not every pattern, but having a comfort with arrays, objects,
and functions before jumping into this book will be useful.

In the next chapter, we’ll look at newer JavaScript syntax to get you
acquainted with the latest JavaScript features, especially those that are
frequently used with React. Then we’ll give an introduction to
functional JavaScript so you can understand the paradigm that gave
birth to React. A nice side effect of working with React is that it can
make you a stronger JavaScript developer by promoting patterns that
are readable, reusable, and testable. Sort of like a gentle, helpful
brainwashing.
From there, we’ll cover foundational React knowledge to understand
how to build out a user interface with components. Then we’ll learn to
compose these components and add logic with props and state. We’ll
cover React Hooks, which allow us to reuse stateful logic between
components.

Once the basics are in place, we’ll build a new application that allows
users to add, edit, and delete colors. We’ll learn how Hooks and
Suspense can help us with data fetching. Throughout the construction
of that app, we’ll introduce a variety of tools from the broader React
ecosystem that are used to handle common concerns like routing,
testing, and server-side rendering.

We hope to get you up to speed with the React ecosystem faster by


approaching it this way—not just to scratch the surface, but to equip
you with the tools and skills necessary to build real-world React
applications.

React’s Past and Future


React was first created by Jordan Walke, a software engineer at
Facebook. It was incorporated into Facebook’s newsfeed in 2011 and
later on Instagram when it was acquired by Facebook in 2012. At
JSConf 2013, React was made open source, and it joined the crowded
category of UI libraries like jQuery, Angular, Dojo, Meteor, and others.
At that time, React was described as “the V in MVC.” In other words,
React components acted as the view layer or the user interface for your
JavaScript applications.
From there, community adoption started to spread. In January 2015,
Netflix announced that they were using React to power their UI
development. Later that month, React Native, a library for building
mobile applications using React, was released. Facebook also released
ReactVR, another tool that brought React to a broader range of
rendering targets. In 2015 and 2016, a huge number of popular tools
like React Router, Redux, and Mobx came on the scene to handle tasks
like routing and state management. After all, React was billed as a
library: concerned with implementing a specific set of features, not
providing a tool for every use case.

Another huge event on the timeline was the release of React Fiber in
2017. Fiber was a rewrite of React’s rendering algorithm that was sort
of magical in its execution. It was a full rewrite of React’s internals that
changed barely anything about the public API. It was a way of making
React more modern and performant without affecting its users.

More recently in 2019, we saw the release of Hooks, a new way of


adding and sharing stateful logic across components. We also saw the
release of Suspense, a way to optimize asynchronous rendering with
React.

In the future, we’ll inevitably see more change, but one of the reasons
for React’s success is the strong team that has worked on the project
over the years. The team is ambitious yet cautious, pushing forward-
thinking optimizations while constantly considering the impact any
changes to the library will send cascading through the community.

As changes are made to React and related tools, sometimes there are
breaking changes. In fact, future versions of these tools may break
some of the example code in this book. You can still follow along with
the code samples. We’ll provide exact version information in the
package.json file so that you can install these packages at the correct
version.

Beyond this book, you can stay on top of changes by following along
with the official React blog. When new versions of React are released,
the core team will write a detailed blog post and changelog about
what’s new. The blog has also been translated into an ever-expanding
list of languages, so if English isn’t your native language, you can find
localized versions of the docs on the languages page of the docs site.

Learning React: Second Edition Changes


This is the second edition of Learning React. We felt it was important
to update the book because React has evolved quite a bit over the past
few years. We intend to focus on all the current best practices that are
advocated by the React team, but we’ll also share information about
deprecated React features. There’s a lot of React code that was written
years ago using old styles that still works well and must be maintained.
In all cases, we’ll make mention of these features in a sidebar in case
you find yourself working with legacy React applications.

Working with the Files


In this section, we’ll discuss how to work with the files for this book
and how to install some useful React tools.
File Repository
The GitHub repository associated with this book provides all the code
files organized by chapter.

React Developer Tools


We’d highly recommend installing React Developer Tools to support
your work on React projects. These tools are available as a browser
extension for Chrome and Firefox and as a standalone app for use with
Safari, IE, and React Native. Once you install the dev tools, you’ll be
able to inspect the React component tree, view props and state details,
and even view which sites are currently using React in production.
These are really useful when debugging and when learning about how
React is used in other projects.

To install, head over to the GitHub repository. There, you’ll find links
to the Chrome and Firefox extensions.

Once installed, you’ll be able to see which sites are using React.
Anytime the React icon is illuminated in the browser toolbar as shown
in Figure 1-1, you’ll know that the site has React on the page.
Other documents randomly have
different content
The Project Gutenberg eBook of
Dirty Dustbins and Sloppy Streets
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: Dirty Dustbins and Sloppy Streets

Author: H. Percy Boulnois

Release date: March 28, 2017 [eBook #54454]


Most recently updated: October 23, 2024

Language: English

Credits: Produced by Chris Curnow, John Campbell and the Online


Distributed Proofreading Team at http://www.pgdp.net
(This
file was produced from images generously made available
by The Internet Archive)

*** START OF THE PROJECT GUTENBERG EBOOK DIRTY DUSTBINS


AND SLOPPY STREETS ***
TRANSCRIBER'S NOTE
Some minor changes are noted at the end of the book.
DIRTY DUSTBINS

AND

SLOPP Y STR EETS .

A PRACTICAL TREATISE ON THE


SCAVENGING AND CLEANSING OF
CITIES AND TOWNS.

B y H . P E R C Y B O U L N O I S , M. Inst. C. E.,
Member (by Exam.) of the Sanitary Institute
of Great Britain,
City Surveyor of Exeter.
E . & F. N . S P O N ,
16, CHARING CROSS.
NEW YORK, 446, BROOME STREET.
1881.

JAMES TOWNSEND, PRINTER, EXETER.


PREFACE.

Some portions of the following pages have already appeared in


the monthly numbers of the Sanitary Engineer, and the complete
work is now published with a view to assist Surveyors of Towns and
others who are directly engaged in providing that house dustbins
shall be regularly cleared, and streets kept clean; and also in the
hope that it may be the means of drawing some public attention to
the question, thus showing the householder something of what is
being done for his welfare by Sanitary Authorities, and how each
individual may assist in the good work, instead of, as is now
frequently the case, inadvertently or purposely retarding the
execution of some very necessary though unostentatious sanitary
measures. I am not aware that any book, or even pamphlet, has yet
been written on this subject, and I venture to believe that in these
pages there may be found something to interest all readers.
H. P. B.
Exeter, May, 1881.
C O N T E N TS.

Chapter I.

SCAVENGING. Page
Town Scavenging or Scavengering—Subject divided into 13
heads—Public Health Act, 1875, and its bearings upon
the question 1

Chapter II.
HOUSE REFUSE.
Definition of house refuse—The law on the subject—
Whether trade and garden refuse must be removed by
the scavenger—Statistics on this point—Disputes as to
what is trade, garden refuse, or house refuse—
Suggestions to settle the question—Other waste
materials 5

Chapter III.

THE DUSTBIN.
The Public Health Act, 1875, on the subject of ashpits—The
model bye-laws and six clauses on the same subject—
Position of the dustbin in respect of the adjacent
dwelling-houses—Suggestions to burn some of the
waste products of a house—Objections to the fixed
ashpit recommended by the Public Health Act—
Suggestions for improvements in this direction—
Movable dust boxes recommended 10
Chapter IV.

THE COLLECTION OF HOUSE REFUSE.


Three methods by which this is effected—The law on the
subject—Statistics on the subject—Lay stall
accommodation, objections, and advantages—Dirty
habits of the lower classes—A house to house
visitation by the scavengers the best system—If
universal, great expense incurred—The bell or signal
system—Objectionable character of temporary
receptacles under this system—State of streets in
consequence—Suggestions for improvements—
Specially constructed conveyance and receptacles—
Advantages of this system both on sanitary and
economical grounds—Delaying the scavenger—The D
signal—Convenient hours for the scavengers' visits 17

Chapter V.
THE SCAVENGERS' CART.
Its form and construction—Description of the "tip cart"—
Splashing and dust therefrom—Other objections to this
form of cart on sanitary and economical grounds—
Introduction of many new forms of carts and waggons
— General description of improvements in their
construction—Some names of makers of sanitary carts
and waggons 27

Chapter VI.

DISPOSAL OF HOUSE REFUSE.


Position of a town with respect to the surrounding district— 31
Sale of refuse to farmers and others the most ready
and economical means of disposal—Site of the refuse
depôt—Loss of bulk in the refuse at the depôt—
Difficulty in disposing of old tins, crockery, &c.—Replies
from 90 towns on the question of disposal of house
refuse—Condemnation of practice of building over
tipped house refuse—Destruction by fire—Fryer's
patent carboniser—Dealing with house refuse on a
gigantic scale at Manchester

Chapter VII.

STREET CLEANSING.
Prosperous appearance of a town—Danger of inhaling dust
—The law on the subject—Who ought to cleanse
private courts and alleys?—Statistics with reference to
this point—Number of times streets ought to be
cleansed—Hand labour or machinery—Durability of
machines and hand brooms—Materials of brooms—
Construction of streets and traffic affect the question
of cleansing materially—Returns prepared by the
Superintendent of Scavenging, Liverpool—His further
remarks on the subject—Disposal of road scrapings—
Street cleansing in Paris—The use of disinfectants in
Paris 46

Chapter VIII.
SNOW.
The density of snow—The amount of snow to be removed
in an ordinary street in England—The removal of snow
in Milan—The removal of snow in Paris—Suggestions
for its removal in England—Clearing footways—The
effect of salt upon snow—Removal of snow in
Liverpool 61
Chapter IX.
STREET WATERING.
Watering necessary on sanitary grounds as well as to
prevent damage from dust—Watering in London—
Watering by horse and cart—The points of importance
to be considered in connection with this service—The
diary of a water cart—Bayley's hydrostatic van—A
description of this machine—Its great advantages over
the old-fashioned water cart—Mr. Scott on the subject
—A trial in Edinburgh—Mr. Tomkins and Bayley's van—
A comparative table of effective work by one of these
vans—Watering streets by ponding water in channel
gutters—Brown's system of watering—Its advantages
and objections—Watering by hose and reels or by
portable iron pipes— Watering at Reading—Watering
at Paris—Use of salt water and other chemicals—
Watering with disinfectants 73

Chapter X.

CONTRACTS V. ADMINISTRATION BY LOCAL


AUTHORITY.
Opinions on this subject by surveyors of towns—The dust
contractor—A model specification of a contract for
removal of house refuse—The system of contracts for
such work condemned—Sanitation first, economy
afterwards 86

C h a p t e r XI.

£ s. d.
The cost of scavenging—Difficulty in fixing any standard of
cost—Physical character of a town and other causes
must be taken into consideration—Statistics show very
various results—Average cost per head of population
per annum about one shilling—Is hiring horses
cheaper than keeping a stud?—Reasons in favour of
the latter plan— Cost of carts, horses, stables, land,
&c.—Wages of scavengers and carters—Depreciation
of horse flesh and of plant—A specimen estimate
where a stud is kept—Another estimate where teams
are hired—Mr. Williams' returns as to cost—List of
questions on the subject of scavenging—Conclusion 90
Chapter I.
" S C AV E N G I N G . "
The word "Scavenging," or "Scavengering," as it is frequently
styled, is a very comprehensive term, as it includes that of house
scavenging or the removal of house refuse, and also that of street
scavenging, or the sweeping and cleansing of streets, and the
carting away of all such materials removed from their surface. In
dealing with this subject it will be necessary to consider the following
heads, viz.:—(1) What is house refuse, (2) How and in what manner
shall it be temporarily stored pending the visit of the Scavenger, (3)
What are the best methods for its collection, (4) In what manner
shall it be eventually disposed of, and (5) the cost of the whole
work; (6) Which are the best methods for sweeping and cleansing
streets, (7) Whether machinery is more economical than hand
labour, (8) The extra work involved by the ill construction of streets
and the materials of which they are formed, (9) Whether private
courts and alleys not repairable by the Sanitary Authority should be
swept and cleansed by them, (10) The ultimate disposal of excessive
accumulations of mud, (11) The removal and disposal of snow, (12)
The watering of streets, and (13) The cost of all such work.
The Public Health Act of 1875 contains several clauses bearing on
the subject of scavenging and the cleansing of streets, and sec. 42,
part III., enacts as follows:—
"Every local authority may, and when required by order of the
Local Government Board shall, themselves undertake or contract for

"The removal of house refuse from premises;
"The cleansing of earth closets, privies, ashpits, and cesspools;
either for the whole or any part of their district.
"Moreover, every urban authority and rural authority invested by
the Local Government Board with the requisite powers may, and
when required by order of the said Board shall, themselves
undertake or contract for the proper watering of streets for the
whole or any part of their district.
"All matters collected by the local authority or contractor in
pursuance of this section may be sold or otherwise disposed of, and
any profits thus made by an urban authority shall be carried to the
account of the fund or rate applicable by them for the general
purposes of this Act; and any profits thus made by a rural authority
in respect of any contributory place shall be carried to the account of
the fund or rate out of which expenses incurred under this section
by that authority in such contributory place are defrayed.
"If any person removes or obstructs the local authority or
contractor in removing any matters by this section authorised to be
removed by the local authority he shall for each offence be liable to
a penalty not exceeding five pounds: provided that the occupier of a
house within the district shall not be liable to such penalty in respect
of any such matters which are produced on his own premises and
are intended to be removed for sale or for his own use and are in
the meantime kept so as not to be a nuisance."
Section 45 also enacts that "any urban authority may, if they see
fit, provide in proper and convenient situations receptacles for the
temporary deposit and collection of dust, ashes, and rubbish; they
may also provide fit buildings and places for the deposit of any
matters collected by them in pursuance of this part of this Act."
The Act also gives the power to local authorities to make bye-laws
with respect to the cleansing of footpaths and pavements, the
removal of house refuse and the cleansing of earth closets, privies,
ashpits, and cesspools, and the prevention of nuisances arising from
snow, filth, dust, ashes, and refuse.
It will thus be seen that the Legislature find it necessary to frame
laws for the proper execution of scavenging by every local authority,
and we shall see in the following chapters how further clauses in the
Public Health Act, as well as in many private Improvement Acts and
also in Bye-laws, detail the manner in which this work ought to be
properly carried out. I shall further endeavour to show where errors
in the working now exist, and give some suggestions that would, in
my opinion, be, if carried out, improvements upon the present
systems.
Chapter II.
HOUSE REFUSE.
Now the first question that presents itself to us is: what is house
refuse? and how is it to be defined? for unless this point is
satisfactorily settled, great onus and expense will be put on the local
authority if they are to be compelled to remove all trade, garden,
and other refuse in addition to what may be legally entitled house
refuse.
Section 4, part I., Public Health Act, 1875, contains the following
definition of the word house: "House" includes schools, also factories
and other buildings in which more than twenty persons are
employed at one time. But all that is apparently said in reference to
the definition of refuse is to be found in "Glenn's Public Health Act,"
1875, where in a foot note to section 44, part III. of the before
named Act, is the negative argument "what is not refuse:" and
describes one or two cases in which it was held that certain ashes
from furnaces, etc., were to be designated as "trade refuse," and
further says "that the intention of the Act was that only the rubbish
arising from the domestic use of houses should be removed."
On reference, however, to some local Improvement Acts, it
appears that the definition is given more in detail, for we find that
house refuse is there described as "all dirt, dust, dung, offal, cinders,
ashes, rubbish, filth, and soil."
We may thus, we imagine, be fairly content with these definitions,
and may assume that all house refuse legally so designated, and
which it is the duty of the scavenger to remove, is really so removed
by the direction of the local authority without dispute, but that the
following articles, which frequently find their way into a domestic
dustbin, are not in the strict terms of the Act expected to be
removed by the scavenger, viz., (1) plaster from walls and brick bats,
(2) large quantities of broken bottles and flower pots, (3) clinkers
and ashes from foundries and greenhouses, (4) wall papers torn
from the rooms of a house, (5) scrap tin (but not old tins which have
contained tinned meats and which, although very objectionable and
bulky, may be fairly assumed to be house refuse), and (6) all garden
refuse such as grass cuttings, dead leaves, and the loppings from
trees and shrubs. The Bromley Local Board issue a card on which is
printed, amongst other information with reference to the contract for
the removal of house refuse, the following:—"It is hoped that
householders will as far as possible facilitate the systematic removal
of refuse by providing suitable dustbins, and directing their servants
that ordinary house refuse only shall be deposited in such
receptacles. The following are some of the items of refuse which the
contractors are bound to remove, viz.:—cinder ashes, potatoe
peelings, cabbage leaves, and kitchen refuse generally. But the
contractors are not required to remove the refuse of any trade,
manufacture, or business, or of any building materials or any garden
cuttings or sweepings." Some valuable statistics have recently been
prepared by me from answers obtained from upwards of ninety of
the principal cities, and towns in England, in reply to a series of
questions which I addressed to the local surveyors on the subject of
scavenging, and on referring to these statistics it is found that out of
these ninety towns, the authorities of only thirteen of them direct
the removal of both trade and garden refuse without any special
extra payment being made by the householder, but that this is only
done when these materials are placed in the ordinary dustbin or
ashpit attached to a house. Several towns, however, it appears
remove such materials on special payments being made of sums
varying from 1s. 6d. to 3s. per load.
Disputes frequently arise between the men employed in
scavenging and the householder on these vexed questions as to the
difference between house, trade, or garden refuse, a dispute often
raised by the scavengers themselves, in the hope of obtaining a
gratuity or reward for the clearance of a dustbin which no doubt,
legally, they are perfectly justified in refusing to empty, and in order
to lessen the chance of such disputes and to attempt to settle this
question the following suggestions may be of value.
It would no doubt be vexatious if any sanitary authority were to
absolutely refuse to remove the "garden" refuse from those houses
to which a small flower garden was attached, whilst it would on the
contrary be an unfair tax upon the general community if the refuse
of large gardens was removed without payment. A good rule would
therefore be to remove only such garden refuse as was contained in
the ordinary dustbin or ashpit attached to a house, and that as the
removal of any kind of trade refuse would no doubt lead to abuses if
done gratuitously by the sanitary authority, that this material should
only be removed on payment of some sum, which should be
previously fixed by the Local Authority, and each case should be
reported to the officer superintending the work before it was
removed.
There are, of course, in addition to the ordinary house refuse the
waste materials from the surface of the streets, and from markets
and slaughter-houses, which have to be collected and disposed of by
the Local Authority, but these materials should be collected in a
special manner, independently of the ordinary removal of the house
refuse.
Chapter III.
THE DUSTBIN.
The next question that we have to consider, having thus far
discussed the subject of "what is house refuse," is the important one
of the manner and place in which it shall be temporarily stored
pending the visit of the scavenger. I will begin as I did in the former
case by turning to the law on the subject, and find out if it can help
us.
Section 40, part III., of the Public Health Act of 1875 enacts that:
"Every local authority shall provide that all drains, water-closets,
earth-closets, privies, ashpits, and cesspools within their district be
constructed and kept so as not to be a nuisance or injurious to
health."
And section 35 of the above Act states, "It shall not be lawful
newly to erect any house or to rebuild any house pulled down to or
below the ground floor without a sufficient water-closet, earth-
closet, or privy, and an ashpit furnished with proper doors and
coverings. Any person who causes any house to be erected or rebuilt
in contravention of this enactment shall be liable to a penalty not
exceeding twenty pounds."
The Act also gives power to local authorities to enforce provision
of ashpit accommodation for houses where such accommodation
does not already exist, and to frame bye-laws with respect to
ashpits.
In the year 1877 the Local Government Board issued a series of
model bye-laws for the use of sanitary authorities, and No. IV. of this
series, which is upon "New Streets and Buildings," contains the
following six lengthy clauses, regulating the position of an ashpit
with reference to a dwelling-house or public-building, or to any
water supply, and for the purpose of removing its contents without
carrying them through any dwelling-house, &c.:—
"80. Every person who shall construct an ashpit in connection with
a building shall construct such ashpit at a distance of six feet at the
least from a dwelling-house or public building, or any building in
which any person may be, or may be intended to be employed in
any manufacture, trade, or business.
"81. A person who shall construct an ashpit in connexion with a
building shall not construct such ashpit within the distance of __ feet
from any water supplied for use, or used or likely to be used by man
for drinking or domestic purposes, or for manufacturing drinks for
the use of man, or otherwise in such a position as to endanger the
pollution of any such water.
"82. Every person who shall construct an ashpit in connexion with
a building shall construct such ashpit in such a manner and in such a
position as to afford ready means of access to such ashpit for the
purpose of cleansing such ashpit, and of removing the contents
thereof, and, so far as may be practicable, in such a manner and in
such a position as to admit of the contents of such ashpit being
removed therefrom, and from the premises to which such ashpit
may belong, without being carried through any dwelling-house or
public building, or any building in which any person may be, or may
be intended to be employed in any manufacture, trade, or business.
"83. Every person who shall construct an ashpit in connection with
a building shall construct such ashpit of a capacity not exceeding in
any case six cubic feet, or of such less capacity as may be sufficient
to contain all dust, ashes, rubbish, and dry refuse which may
accumulate during a period not exceeding one week upon the
premises to which such ashpit may belong.
"84. Every person who shall construct an ashpit in connection with
a building shall construct such ashpit of flagging, or of slate, or of
good brickwork, at least nine inches thick, and rendered inside with
good cement or properly asphalted.
"He shall construct such ashpit so that the floor thereof shall be at
a height of not less than three inches above the surface of the
ground adjoining such ashpit, and he shall cause such floor to be
properly flagged or asphalted.
"He shall cause such ashpit to be properly roofed over and
ventilated, and to be furnished with a suitable door in such a
position and so constructed and fitted as to admit of the convenient
removal of the contents of such ashpit, and to admit of being
securely closed and fastened for the effectual prevention of the
escape of any of the contents of such ashpit.
"85. A person who shall construct an ashpit in connexion with a
building shall not cause or suffer any part of such ashpit to
communicate with any drain."
There can be no doubt that the position of the dustbin or ashpit,
as regards its site with reference to the main dwelling-house, is of
primary sanitary importance, for if the garbage and domestic
accumulations therein are allowed to remain for a few days,
especially when the weather is close, damp, and warm, they become
very offensive, and the emanations therefrom may even be highly
deleterious and dangerous to health; this effect is aggravated by
persons emptying vegetable refuse and other matters which are wet
into the dustbin, as decomposition of these matters is greatly
assisted by this addition, and it would be well that all such matters
should be burnt on the kitchen or scullery fire along with a large
percentage of the ashes which could be sifted and saved from those
which too readily find their way into the dustbin, and are thus
wasted. Care would of course have to be taken in this process that
no smell or nuisance was caused by burning this refuse, but the
greatest difficulty would arise in overcoming the time-honoured
prejudices of the domestic servant who usually finds the dustbin or
ashpit the most convenient and least troublesome place to dispose
of nearly everything that to her may be entitled rubbish.
Now with all due respect to those who framed Section 35 of the
Public Health Act of 1875, it is open to considerable doubt whether
the fixed dustbin or ashpit, as it is there styled, is the best and most
sanitary receptacle for the house refuse. They may be necessary and
suitable for Public Institutions, or for large isolated private dwellings,
or for schools or any places where excessive quantities of refuse
may accumulate, but where this refuse is systematically and properly
removed by the order of the local authority, at such times and in
such manner as will be hereafter pointed out, a movable or portable
dustbin, box, or basket, is far preferable to the large immoveable
inconvenient fixed ashpit, recommended and enforced under the
Act.
This portable dustbox should be of such dimensions that the men
employed in removing the refuse could easily carry it out and empty
its contents into the cart, and there is nothing to prevent more than
one being provided, if it is found insufficient for the requirements of
the household. The box should be made of iron, or wood or basket
lined with tin, or some equally impervious material, so that it can
easily be washed out and thoroughly cleansed and disinfected when
found necessary to do so, a matter very difficult to accomplish with
the fixed ashpit. The whole of its contents could be quickly emptied,
which is more than can be easily effected with the fixed ashpit, and
then only when very special arrangements are made for its drainage.
The movable dustbox can, in addition to these advantages, be
placed in any part of the premises, and may be covered or not as
may be deemed desirable, and need not, like many of the existing
ashpits, be fixed in such a position as to appear to have been thus
placed for the express purpose of poisoning with its foul smell the
whole of the inhabitants in its vicinity. The movable box can also be
readily taken out to the scavenging cart by the householder himself,
a very essential requisite, as will be shown in the next chapter.
C h a p t e r I V.
THE COLLECTION OF HOUSE REFUSE.
The collection of house refuse should be done satisfactorily,
expeditiously, and economically.
At the present time there seem to be only three methods by which
this is attempted to be effected; they are as follows:—
(1.) By a house to house call at intermittent periods.
(2.) By the scavengers giving notice of their approach by ringing a
bell or by other signal, and requiring the householder to bring out
the refuse to the cart, and
(3.) By placing public dustbins in different localities, and expecting
householders in their vicinity to place the house refuse in these
dustbins, which would then be cleared from time to time by the local
authority.
The law is silent on the subject of what may be considered as an
efficient collection and removal of house refuse, and experience only
can teach us the best manner of thoroughly effecting this work
without losing sight of the economical side of the question; but it
appears, on again referring to the table of statistics which have been
previously mentioned, that nearly all the towns adopt the two first
methods mentioned above for the removal of the house refuse, but
that very few of them are able to adopt any public dustbins or "lay
stall" accommodation for the temporary reception of the refuse, not
only on account of their first cost, but also from the difficulty of
finding suitable positions for them. This latter objection to the
adoption of public dustbins arises in great measure from the fact
that they are usually constructed of galvanised iron in the form of
open boxes or troughs, which are readily accessible to young

You might also like