投稿時間:2021-06-28 05:17:06 RSSフィード2021-06-28 05:00 分まとめ(21件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) MPAとSSRの違いがわからない https://teratail.com/questions/346488?rss=all MPAとSSRの違いがわからないMPAとSSRの違いがわからないです。 2021-06-28 04:12:10
海外TECH DEV Community Replace Graphiql With Graphql Playground Using These Simple Steps https://dev.to/sjcodebook/replace-graphiql-with-graphql-playground-using-these-simple-steps-5bdl Replace Graphiql With Graphql Playground Using These Simple StepsOriginal Post Link gt Graphiql is the default IDE for working with Graphql API in Gatsby But Gatsby also support newer and more featured IDE known as Graphql Playground Graphql Playground provides us with additional features like a nice fully customizable UI interface multiple tab options detailed docs drawer copy CURL option etc These features makes building queries easy and fun So lets see how we can swap Graphiql for Graphql Playground Steps To Replace Graphiql To Graphql Playground Install dotenv dependencyFor replacing the IDE we need to declare an environment variable and for that environment variable to load in process env we need to use an dotenv package You can install it by running this command npm install dotenv Define the environment variableFor gatsby to know that we want to use Graphql Playground we need to define an environment variable GATSBY GRAPHQL IDE playground We can define this variable in an env file Its a best practice to seperate environment variables for development and production So we can define the env files in our root folder like this env development and env production ├ーnode modules├ーpublic├ーsrc├ーstatic├ー env development├ー env productionNow In the env development file define this key value pair env development GATSBY GRAPHQL IDE playground Update gatsby config jsInside your gatsby config js file at the very top require the dotenv plugin and provide the path to the appropriate env file gatsby config js require dotenv config path env process env NODE ENV module exports siteMetadata Now when you run gatby develop it will set the NODE ENV to development and the dotenv package will load the environment variables defined in env development file Finally go to http localhost graphql and use the newer and nicer Graphql Playground IDE Original Post Link gt 2021-06-27 19:43:34
海外TECH DEV Community Migrate From Remark To MDX In Gatsby Using These Simple Steps https://dev.to/sjcodebook/migrate-from-remark-to-mdx-in-gatsby-using-these-simple-steps-322a Migrate From Remark To MDX In Gatsby Using These Simple StepsOriginal Post Link gt MDX VS RemarkMdx and remark are both markdown compilers i e they convert markdown to HTML So that it can be rendered on the browser We can also write HTML in our md file as the final result is HTML the compiler will process it as HTML Coming to Remark It gives us the advantage of extending its functionalities using plugins Mdx is also very similar to remark and icing on the cake is it supports all remark plugins But what makes it so popular is the ability to process JSX in md files Basically it converts the markdown files into React components making it eligible for importing and rendering other components This MDX s ability becomes very useful for things like data visualization in your blog MDX makes blogging super fun and easy Now lets see how we can convert an existing gatsby blog to use MDX in place of Remark Steps To Migrate From Remark To MDX Installing MDX pluginWe first need to install the gatsby plugin mdx plugin with its dependencies mdx js mdx and mdx js react npm install gatsby plugin mdx mdx js mdx mdx js reactAlso remove the gatsby transformer remark plugin npm remove gatsby transformer remark Replacing Remark Plugin With MDXGo to your gatsby config js file Replace plugin gatsby transformer remark with gatsby plugin mdx gatsby config js resolve gatsby transformer remark resolve gatsby plugin mdx options Most of the sub plugins of Remark works perfectly with MDX We just need to change the plugins option to gatsbyRemarkPlugins to let MDX know that these are Remark plugins gatsby config js resolve gatsby plugin mdx options plugins gatsbyRemarkPlugins Note You need to add gatsby remark images plugin as both a sub plugin of gatsby plugin mdx and a string entry in the plugins array gatsby config js module exports plugins gatsby remark images resolve gatsby source filesystem options path dirname content blog name blog resolve gatsby source filesystem options path dirname content assets name assets resolve gatsby plugin mdx options extensions md mdx gatsbyRemarkPlugins resolve gatsby remark images options maxWidth linkImagesToOriginal true resolve gatsby remark copy linked files resolve gatsby remark smartypants resolve gatsby plugin feed resolve gatsby plugin sharp Change File ExtensionsChange your markdown files extension from md to mdx This will allow MDX to recognize and process them with specified configurations If you don t want to change the files extention might be because of large number of files in your project In this case you can configure MDX plugin to accept both md and mdx files by adding the extensions option in gatsby plugin mdx like this gatsby config js resolve gatsby plugin mdx options extensions md mdx Tip If you use Vs code as your code editor Use this MDX extention for syntax highlighting and bracket matching in MDX files Changes In gatsby node jsIn the createPages API Replace allMarkdownRemark with allMdx gatsby node js exports createPages graphql actions gt const createPage actions const blogPost path resolve src templates blog post tsx const blogList path resolve src templates blog list tsx const tagTemplate path resolve src templates tags tsx return graphql allMarkdownRemark allMdx sort fields frontmatter date order DESC limit edges Also In the onCreateNode API Where it compares the node type to create slugs there replace MarkdownRemark to Mdx gatsby node js exports onCreateNode node actions getNode gt const createNodeField actions if node internal type MarkdownRemark if node internal type Mdx const value createFilePath node getNode if typeof node frontmatter slug undefined createNodeField node name slug value node frontmatter slug else Other ReplacementsIn your GraphQL queries wherever you use allMarkdownRemark change it to allMdx and markdownRemark to mdx Also in the mdx feild in query change html to body src templates blog post tsx export const pageQuery graphql query BlogPostBySlug slug String tag String site siteMetadata siteUrl markdownRemark fields slug eq slug mdx fields slug eq slug id excerpt pruneLength html body fields slug frontmatter title date formatString DD MMM YYYY description hasJs tags cover publicURL childImageSharp fluid maxWidth quality GatsbyImageSharpFluid noBase allMarkdownRemark allMdx limit sort fields frontmatter date order DESC filter frontmatter tags in tag fields slug ne slug edges Note There is a chance that you receive an error at build time by a plugin which is quering for allMarkdownRemark I received this error from gatsby plugin feed plugin to resolve this i moved this inside gatsbyRemarkPlugins option in gatsby plugin mdx from the main plugins array Now In your post template file import MDXRenderer component from gatsby plugin mdx src components post details post details tsx import from lodash import MDXRenderer from gatsby plugin mdx import Link from gatsby Finally Replace dangerouslySetInnerHTML to a MDXRenderer component src components post details post details tsx lt PostDescriptionWrapper className post des wrapper gt lt PostDescription dangerouslySetInnerHTML html description className post des gt lt PostDescription className post des gt lt MDXRenderer gt description lt MDXRenderer gt lt PostDescription gt tags null null lt PostTags gt tags map tag index gt lt Link key index to tags kebabCase tag gt tag lt Link gt lt PostTags gt lt PostDescriptionWrapper gt ConclusionNow you can use custom React components or third party UI elements in your markdown files Remember that MDX uses JSX in place of HTML So make sure that HTML in you markdown file is valid JSX for example if you have used class attribute in HTML component change it to className So that it doesn t create a conflict when processed by MDX Original Post Link gt 2021-06-27 19:37:10
海外TECH DEV Community Class Fields in JavaScript 🔥 https://dev.to/suprabhasupi/class-fields-in-javascript-500 Class Fields in JavaScript In JavaScript there are two types of object fields properties and methods ️⃣Public Accessible from anywhere They comprise the external interface Until now we were only using public properties and methods ️⃣Private Accessible only from inside the class These are for the internal interface Class fields are public by default but private class members can be created by using a hash prefix Class Field SyntaxYou can define new private membersYou will get error if you break the access ruleIt has public and private static fields which allow you to declare class member that can be accessed without creating instance of the classUsing variable like variableName it means we can use that variable only in the class exampleclass GetDateTime start getDate if true this start new Date But this does not prevent start variable accessible publicly Checkout here let date new GetDateTime console log date start Thu Jun GMT India Standard Time To create real private instance you can use to create private variables NOTE You just need to replace with class GetDateTime start getDate if true this start new Date let date new GetDateTime console log date start Uncaught SyntaxError Private field start must be declared in an enclosing classThe encapsulation is enforced by language It has also support for private methods Example class GetDateTime start getDate if true return this getNow getNow this start new Date let date new GetDateTime console log date getDate Thu Jun GMT India Standard Time The private methods can only be accessible inside of the class Private static fieldsYou can also create private static variable The limitation of static variables being called by only static methods still holds class GetDateTime static start static getDate if true this start new Date return this start console log GetDateTime getDate Thu Jun GMT India Standard Time Reference Private Class Fields Twitter ‍ suprabha me Instagram 2021-06-27 19:30:33
海外TECH DEV Community Introduction to Law and Artificial Intelligence - Upcoming event https://dev.to/cyberqueen/introduction-to-law-and-artificial-intelligence-upcoming-event-49g4 Introduction to Law and Artificial Intelligence Upcoming eventJoin me AI Advocates Community to learn how Law affects artificial intelligence and also how artificial intelligence affects the law field Many people don t really understand the concept of law and AI So AI Advocates Community is advocating for it DATE of the event July Register for the event using the link below 2021-06-27 19:11:56
Apple AppleInsider - Frontpage News How to encrypt your Mac, iPhone, and iPad backups https://appleinsider.com/articles/21/06/27/how-to-encrypt-your-mac-iphone-and-ipad-backups?utm_medium=rss How to encrypt your Mac iPhone and iPad backupsPrivacy is becoming more of a priority of users and that includes increased use of encryption Here s how to set Apple s backup systems for Mac iPhone and iPad devices to encrypt the copies of your data Encrypted backups offer considerably more privacy than unencrypted versions User privacy is a big deal for Apple which has gone to considerable lengths to enable encryption and minimize personal data use in its products and services The focus on such security means Apple s customers can be reasonably sure that their personal data has a good level of protection in general Read more 2021-06-27 19:43:09
海外TECH Engadget Venmo will let you sell goods through your personal account https://www.engadget.com/venmo-personal-account-sales-193759838.html?src=rss_b2c account 2021-06-27 19:37:59
ニュース BBC News - Home France elections: Far-right National Rally loses key battleground states - poll https://www.bbc.co.uk/news/world-europe-57631418 election 2021-06-27 19:43:28
ビジネス ダイヤモンド・オンライン - 新着記事 【入山章栄・解説動画】伊佐山元、高岡浩三両氏の名言に学ぶ、イノベーションの極意 - 入山章栄の世界標準の経営理論 https://diamond.jp/articles/-/272748 世界標準 2021-06-28 04:50:00
ビジネス ダイヤモンド・オンライン - 新着記事 本当は怖い住宅ローンのボーナス払い、超えると危険な「割合」とは? - 絶対やってはいけないお金の話 https://diamond.jp/articles/-/275049 住宅ローン 2021-06-28 04:45:00
ビジネス ダイヤモンド・オンライン - 新着記事 コロナ「第5波」懸念も、日本株の再上昇が期待されるワケ - 政策・マーケットラボ https://diamond.jp/articles/-/275163 コロナ「第波」懸念も、日本株の再上昇が期待されるワケ政策・マーケットラボまん延防止等重点措置の適用や緊急事態宣言により、人出が減ることで感染拡大が抑制されるが、同時に個人消費も減少し、経済活動が落ち込む。 2021-06-28 04:40:00
ビジネス ダイヤモンド・オンライン - 新着記事 「東大卒」がグローバル出世候補からはじかれかねない2つの理由 - 組織の病気~成長を止める真犯人~ 秋山進 https://diamond.jp/articles/-/275074 重要 2021-06-28 04:37:00
ビジネス ダイヤモンド・オンライン - 新着記事 “5年後の業界地図”大予測!11業種全77社の「業績・再編・給与」を徹底分析 - 業績 再編 給与 5年後の業界地図 https://diamond.jp/articles/-/275026 2021-06-28 04:35:00
ビジネス ダイヤモンド・オンライン - 新着記事 埼玉vs千葉「ビジネス大戦」が激化!経済力、不動産、教育…首都圏3位の座はどっち!? - 埼玉vs千葉 勃発!ビジネス大戦 https://diamond.jp/articles/-/274991 馬鹿 2021-06-28 04:30:00
ビジネス ダイヤモンド・オンライン - 新着記事 中銀デジタル通貨、FRB高官ようやく言及開始 - WSJ発 https://diamond.jp/articles/-/275212 高官 2021-06-28 04:27:00
ビジネス ダイヤモンド・オンライン - 新着記事 年収が高い小売会社ランキング2020最新版【トップ10】2位三越伊勢丹HD、1位は? - ニッポンなんでもランキング! https://diamond.jp/articles/-/274684 三越伊勢丹 2021-06-28 04:25:00
ビジネス ダイヤモンド・オンライン - 新着記事 年収が高い小売会社ランキング2020最新版【全285社・完全版】 - ニッポンなんでもランキング! https://diamond.jp/articles/-/274605 最新版 2021-06-28 04:25:00
ビジネス ダイヤモンド・オンライン - 新着記事 サントリー佐治会長がほれ込んだ、名門ゴルフ倶楽部での新浪社長のプレー姿 - 今週の週刊ダイヤモンド ここが見どころ https://diamond.jp/articles/-/275007 見どころ 2021-06-28 04:20:00
ビジネス ダイヤモンド・オンライン - 新着記事 JR東海が「降雨運転規制の見直し」に2年をかけた理由 - News&Analysis https://diamond.jp/articles/-/274962 newsampampanalysisjr 2021-06-28 04:15:00
ビジネス ダイヤモンド・オンライン - 新着記事 51歳会社員、老後資金を作りたいなら「時間を味方に付ける」意識で - “残念サラリーマン”のお金相談所 https://diamond.jp/articles/-/275047 歳会社員、老後資金を作りたいなら「時間を味方に付ける」意識で“残念サラリーマンのお金相談所「投資を始めたほうがよいとは思うけれど、なかなか踏み出せない」という人は多いもの。 2021-06-28 04:05:00
ビジネス 東洋経済オンライン 足湯新幹線を「オフィス化」、大胆発想の全舞台裏 「とれいゆ」使い10月運行、JRと山形県が企画 | 新幹線 | 東洋経済オンライン https://toyokeizai.net/articles/-/436823?utm_source=rss&utm_medium=http&utm_campaign=link_back 取り組み 2021-06-28 04:30:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)