235 ns='common'
236 components={{
237 ATLink: (
238 <Link239 external240 variant={variants.Link.inheritStyle}241 href='https://www.erininthemorning.com/p/anti-trans-legislative-risk-assessment-cd3'242 target='_blank'243 ></Link>244 ),
245 }}
246 />
206 ></Link>
207 ),
208 TMFLink: (
209 <Link210 external211 variant={variants.Link.inheritStyle}212 href='https://transmascfutures.inreach.org'213 target='_blank'214 ></Link>215 ),
216 }}
217 />
198 ></Link>
199 ),
200 DonateLink: (
201 <Link202 external203 variant={variants.Link.inheritStyle}204 href='https://inreach.kindful.com/embeds/9e692b4a-fcfc-46a2-9a0e-4f9b8b0bd37b'205 target='_blank'206 ></Link>207 ),
208 TMFLink: (
209 <Link
190 ns='landingPage'
191 components={{
192 Link: (
193 <Link194 external195 variant={variants.Link.inheritStyle}196 href='https://inreach.org/introducing-the-redesigned-inreach-app'197 target='_blank'198 ></Link>199 ),
200 DonateLink: (
201 <Link
153 .
154 </Link>
155 ),
156 LinkSafety: <PrivacyStatementModal component={Link} {...linkProps}></PrivacyStatementModal>,157 }}
158 />
159 )
Components without children can be self-closed to avoid the unnecessary extra closing tag. In JSX, closing tags are required when the component has children example <MyComponent>...</MyComponent>
and if there are no child component between these tags, then this component can be self closed using <MyComponent />
. It is recommended as it improves readability, and it is more compact to use self-closing for these types of components.
var HelloJohn = <Hello name="John"></Hello>;
var HelloJohnCompound = <Hello.Compound name="John"></Hello.Compound>;
var HelloJohn = <Hello name="John" />;
var HelloJohnCompound = <Hello.Compound name="John" />;