<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Snookums</title>
    <description>The latest articles on DEV Community by Snookums (@snookums).</description>
    <link>https://dev.to/snookums</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1407366%2F4ba8f677-d25c-40b2-8f37-2815a7a0422d.jpg</url>
      <title>DEV Community: Snookums</title>
      <link>https://dev.to/snookums</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/snookums"/>
    <language>en</language>
    <item>
      <title>How do I embed the Auth0 login page into my own web page?</title>
      <dc:creator>Snookums</dc:creator>
      <pubDate>Mon, 27 May 2024 16:47:10 +0000</pubDate>
      <link>https://dev.to/snookums/how-do-i-embed-the-auth0-login-page-into-my-own-web-page-1ngi</link>
      <guid>https://dev.to/snookums/how-do-i-embed-the-auth0-login-page-into-my-own-web-page-1ngi</guid>
      <description>&lt;p&gt;I am using &lt;a href="https://auth0.com/" rel="noopener noreferrer"&gt;Auth0&lt;/a&gt;'s Universal Login, which looks like below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwf010w4dou5s5r1vs3jr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwf010w4dou5s5r1vs3jr.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My question is, how to embed this UI component into my own web page?&lt;/p&gt;

&lt;p&gt;The desired effect is like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiup4i6bmjk5c3dy7uxqb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiup4i6bmjk5c3dy7uxqb.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I checked Auth0's doc but didn't find instructions.&lt;br&gt;
Does it not support it? &lt;br&gt;
If this is the case, are there any other services that I can use?&lt;br&gt;
Or do I have to implement the OAuth procedure myself?&lt;/p&gt;

&lt;p&gt;Thanks in advance!&lt;/p&gt;

</description>
      <category>oauth</category>
      <category>auth0</category>
    </item>
    <item>
      <title>Why in Typescript creating an enum doesn't need a =, but creating a new type does?</title>
      <dc:creator>Snookums</dc:creator>
      <pubDate>Thu, 18 Apr 2024 03:45:45 +0000</pubDate>
      <link>https://dev.to/snookums/why-in-typescript-creating-an-enum-doesnt-need-a-but-creating-a-new-type-does-42fk</link>
      <guid>https://dev.to/snookums/why-in-typescript-creating-an-enum-doesnt-need-a-but-creating-a-new-type-does-42fk</guid>
      <description>&lt;p&gt;To create a new &lt;code&gt;enum&lt;/code&gt;, the syntax is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enum Some {
    ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But to create a new &lt;code&gt;type&lt;/code&gt;, the syntax requires a &lt;code&gt;=&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type Some = {
    ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I wonder why this &lt;code&gt;=&lt;/code&gt; is needed? &lt;/p&gt;

&lt;p&gt;I think it confuses type and value, and other languages are not like this. &lt;/p&gt;

&lt;p&gt;For example, in C++, creating a &lt;code&gt;struct&lt;/code&gt; doesn't need a &lt;code&gt;=&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>typescript</category>
    </item>
    <item>
      <title>How to dynamically import Swiper.js in Next.js?</title>
      <dc:creator>Snookums</dc:creator>
      <pubDate>Wed, 17 Apr 2024 23:20:52 +0000</pubDate>
      <link>https://dev.to/snookums/how-to-dynamically-import-swiperjs-in-nextjs-4k6i</link>
      <guid>https://dev.to/snookums/how-to-dynamically-import-swiperjs-in-nextjs-4k6i</guid>
      <description>&lt;p&gt;The question is posted on StackOverflow, but no one has helped so far.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/78342672/how-to-use-swiper-js-in-next-js"&gt;https://stackoverflow.com/questions/78342672/how-to-use-swiper-js-in-next-js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am a little desperate. Could anyone take a look please?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

</description>
      <category>swiper</category>
      <category>nextjs</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Is Javascript's import syntax semantically wrong?</title>
      <dc:creator>Snookums</dc:creator>
      <pubDate>Wed, 17 Apr 2024 18:50:07 +0000</pubDate>
      <link>https://dev.to/snookums/is-javascripts-import-syntax-semantically-wrong-ge7</link>
      <guid>https://dev.to/snookums/is-javascripts-import-syntax-semantically-wrong-ge7</guid>
      <description>&lt;p&gt;In JS, if when import a file as a whole, the syntax is &lt;br&gt;
&lt;code&gt;import XXX from './xxx'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;But I think this is semantically wrong, because the word &lt;code&gt;from&lt;/code&gt; indicates that the thing you are importing is a part of the file, not the file itself.&lt;/p&gt;

&lt;p&gt;For example, if A takes a candy &lt;strong&gt;from&lt;/strong&gt; B, then the candy is just a part of B's belongings, not B himself.&lt;/p&gt;

&lt;p&gt;So it should be just &lt;code&gt;import './xxx'&lt;/code&gt;, and it is like this in other languages such as Java.&lt;/p&gt;

&lt;p&gt;If we need to give it an alias, it is &lt;code&gt;import './xxx' as xxx&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If it is like this, then when importing parts from a file, we can omit the dereference curly brackets, so it is &lt;code&gt;import XXX from './xxx'&lt;/code&gt; instead of &lt;code&gt;import { XXX } from './xxx'&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;In the latter, &lt;code&gt;{}&lt;/code&gt; and &lt;code&gt;from&lt;/code&gt; are redundant and confusing.&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Why &lt;img&gt; exceeds its parent &lt;div&gt;'s size?</title>
      <dc:creator>Snookums</dc:creator>
      <pubDate>Wed, 17 Apr 2024 18:26:05 +0000</pubDate>
      <link>https://dev.to/snookums/why-exceeds-its-parent-s-size-2cln</link>
      <guid>https://dev.to/snookums/why-exceeds-its-parent-s-size-2cln</guid>
      <description>&lt;p&gt;&lt;a href="https://codepen.io/powerseed/pen/poBxEeM"&gt;https://codepen.io/powerseed/pen/poBxEeM&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I guess this is some default setting of HTML, but it is really weird and counter-intuitive.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;div&lt;/code&gt; is like a box, &lt;code&gt;img&lt;/code&gt; is an item inside the box, how is that possible that the item inside a box is bigger than the box, like a ball is bigger than its packing box?&lt;/p&gt;

&lt;p&gt;It is against ppl's life experience.&lt;/p&gt;

&lt;p&gt;I wonder what is the rationale behind this setting? &lt;br&gt;
In other words, what downs will happen if it is not like this?&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;

</description>
      <category>html</category>
    </item>
    <item>
      <title>Can I just write inline CSS in the normal way in React?</title>
      <dc:creator>Snookums</dc:creator>
      <pubDate>Fri, 05 Apr 2024 03:59:08 +0000</pubDate>
      <link>https://dev.to/snookums/can-i-just-write-inline-css-in-the-normal-way-in-react-51gf</link>
      <guid>https://dev.to/snookums/can-i-just-write-inline-css-in-the-normal-way-in-react-51gf</guid>
      <description>&lt;p&gt;I read some articles like &lt;a href="https://www.pluralsight.com/resources/blog/guides/inline-styling-with-react"&gt;&lt;br&gt;
Inline Styling with React&lt;br&gt;
&lt;/a&gt;, but it seems that to write inline CSS, I have to convert the normal CSS names into camel case, like &lt;code&gt;lineHeight&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But I just want to write CSS in the most normal way, like &lt;br&gt;
&lt;code&gt;style="line-hight: 1px"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Can I do it in React?&lt;/p&gt;

&lt;p&gt;If not, I would say this design is really really bad...&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
