Learning React: Modern Patterns for Developing React Apps, 2nd Edition (eBook PDF) pdf download
Learning React: Modern Patterns for Developing React Apps, 2nd Edition (eBook PDF) pdf download
https://ebookluna.com/product/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
https://ebookluna.com/product/ebook-pdf-instructional-patterns-
strategies-for-maximizing-student-learning/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-reflections-patterns-for-
reading-and-writing-2nd-edition/
ebookluna.com
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
https://ebookluna.com/product/original-pdf-learning-for-teaching-
teaching-for-learning-with-student-resour/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-developing-content-area-
literacy-40-strategies-for-middle-and-secondary-classrooms-2nd-
edition/
ebookluna.com
https://ebookluna.com/download/business-communication-developing-
leaders-for-a-networked-world-ebook-pdf/
ebookluna.com
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
Copyright © 2020 Alex Banks and Eve Porcello. All rights reserved.
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.
Along the way, check out the GitHub repository. All of the examples
are there and will allow you to practice hands-on.
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.
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.
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.
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.
How to Contact Us
Please address comments and questions concerning this book to the
publisher:
Sebastopol, CA 95472
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.
For news and information about our books and courses, visit
http://oreilly.com.
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.
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.
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.
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.
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.
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.
Language: English
AND
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.
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.
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.
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.
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