AWS |
AWS News Blog |
AWS Week in Review – October 31, 2022 |
https://aws.amazon.com/blogs/aws/aws-week-in-review-october-31-2022/
|
AWS Week in Review October No tricks just treats in this weekly roundup of news and announcements Let s switch our AWS Management Console into dark mode nbsp and dive right into it Last Week s Launches Here are some launches that got my attention during the previous week AWS Local Zones in Hamburg and Warsaw now generally available AWS Local Zones help … |
2022-10-31 16:48:05 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
Pythonでファイルの命名に時刻を用いる方法 |
https://qiita.com/hinata1119/items/e80844a080c5116a60ee
|
記事 |
2022-11-01 01:26:53 |
golang |
Goタグが付けられた新着投稿 - Qiita |
[Golang]Requests |
https://qiita.com/yukiaprogramming/items/4e2c275e871c0f074a37
|
routergetfuncc |
2022-11-01 01:55:45 |
GCP |
gcpタグが付けられた新着投稿 - Qiita |
【Google CloudNext '22】GAが発表されたBatchを試してみるのとそれの所感 |
https://qiita.com/hirosait/items/920bbe9c948a1b93002f
|
batch |
2022-11-01 01:14:04 |
海外TECH |
MakeUseOf |
6 Hacks to Create Engaging Content as a Social Media Manager |
https://www.makeuseof.com/hacks-to-create-engaging-content-social-media/
|
Hacks to Create Engaging Content as a Social Media ManagerAs a social media manager your job is to create engaging content that keeps your audience engaged Here are some ways to accomplish this feat |
2022-10-31 16:30:14 |
海外TECH |
DEV Community |
The Best Way To Build Big React Components 🤯 |
https://dev.to/devsatasurion/the-best-way-to-build-big-react-components-5295
|
The Best Way To Build Big React Components With my current development team I m building a reusable react component library Some of these components like our lt Button gt are fairly simple I can easily expose all the Button s options and functionalities through its props Something like this lt Button id my cool button onClick gt console log I got clicked variant secondary disabled false size large gt Press Me lt Button gt But even for such a simple example we end up with quite a few lines of code This problem of having too many props gets far more dramatic when we begin looking at complex composed components which are made up of many different pieces Take for example the lt Modal gt Our design includes a header with multiple configurations including primary title subtitle a hero image and or a close button a call to action footer allowing a variable number of buttons in different layouts and a primary content section In addition to the standard props of each Text Image and Button component for all of these items our consumers have asked for the ability to do additional layout and style customization That s a lot of props There has to be a better way to do this and there is This blog post aims to cover the solution that our team has taken in answering the following question How can we build composed components to provide default styles customizability and a clean API And how to do you do it all in TypeScript The ProblemFirst let s dig a little deeper into exactly what we want to accomplish To start consuming our library all a team has to do is yarn add our react library and import Component from our react library Most developers won t ever look at our code instead they ll browse component documentation in our interactive Storybook As we prioritize ease of use we want all of our components to look great out of the box In addition to a React library our team also publishes global design standards and a design component library for use across the company However there are often edge cases or situations where a team wants to make tweaks or changes Those are easy enough to approve in design but often require us to expose many layers of classNames eww or add even more props in React Our solution for the modal needs to support multiple variants but avoid introducing an ungainly number of props Finally we always want to provide a great developer experience that means delivering an API that allows our users to write clean concise code Using long component names like ModalPrimaryTitle or polluting our package namespace with generic PrimaryTitle aren t acceptable solutions Neither is using nested objects as props to hide config or options which is difficult to document and doesn t work well with Storybook And of course we want to build TypeScript first ️ The ProcessI started this journey with our old modal which had a lot of props and still was very challenging to customize And the new design our team came up with included more options and flexibility than before We knew very early on that we wanted to avoid any solution that was too prop heavy which pushed us towards exposing multiple elements to the user Something like this lt Modal gt lt h gt Main Title lt h gt lt h gt Subtitle lt h gt bodyContent lt button gt CTA lt button gt lt Modal gt One early suggestion was to update our code snippet generator in Storybook to return raw HTML that looked like a modal so we didn t even need to make a component But that solution would detach our consumers code from our library rendering us unable to push new features or fixes without them updating their code It would also be difficult to style because we used styled components instead of relying on class names or bundling a stylesheet Still we liked the direction we were headed in The next suggestion was to provide a simple Modal that acted as a container allowing users to pass our other existing components into it But the layout was too complex to tackle without additional wrappers for the header and footer so we added those which gave us greater customizability import Modal ModalHeader ModalContent ModalFooter Text Button from our react library lt Modal gt lt ModalHeader gt lt Text as h size weight bold gt Main Title lt Text gt lt Text as h size gt Subtitle lt Subtitle gt lt ModalHeader gt lt ModalContent gt bodyContent lt ModalContent gt lt ModalFooter gt lt Button variant primary size large onClick gt console log Clicked gt Go forth and prosper lt Button gt lt ModalFooter gt lt Modal gt This is looking better but it still had a few issues Namely we were asking our users to manually apply default styles to the title subtitle call to action buttons and more and we were polluting our namespace with lots of Modal specific components The solution to the st problem is easy but it exasperates the second problem introduce a ModalTitle component a ModalSubtitle component a ModalCTA component etc Now if we can just find a simple place to put all those pesky components we would have a pretty good solution What if we put the sub components on Modal itself The SolutionBelow is the API we decided on Every component matches our design out of the box but also allows for customization using CSS classes or styled components Adding or removing full sections or adding custom components anywhere in the flow is fully supported The API is clean and concise and most importantly the namespace is immaculate import Modal from our react library lt Modal gt lt Modal Header gt lt Modal Title gt Main Title lt Modal Title gt lt Modal Subtitle gt Subtitle lt Modal Subtitle gt lt Modal Header gt lt Modal Content gt This is my body content lt Modal Content gt lt Modal Footer gt lt Modal CTA gt Click me lt Modal CTA gt lt Modal Footer gt lt Modal gt Now I know what you re thinking That looks great but how can you make that work in TypeScript I m glad you asked We use React functional components to build most of our library so inside the library our files look something like this export const Button children size props ButtonProps JSX Element gt if size jumbo return lt StyledButton size size props gt children lt StyledButton gt TypeScript however does not allow us to assign additional props to a const especially after we export it This poses a problem Somehow we have to attach props to what is essentially a function without writing a ton of duplicate code Another pesky problem is setting correct displayNames for React DevTools and more importantly our Storybook code generator Here s the magic function import React from react Attaches subcomponents to a parent component for use in composed components Example lt Parent gt lt Parent Title gt abc lt Parent Title gt lt Parent Body prop foobar gt lt Parent gt This function also sets displayname on the parent component and all children component and has the correct return type for typescript param displayName topLevelComponent s displayName param topLevelComponent the parent element of the composed component param otherComponents an object of child components keys are the names of the child components returns the top level component with otherComponents as static properties export function attachSubComponents lt C extends React ComponentType O extends Record lt string React ComponentType gt gt displayName string topLevelComponent C otherComponents O C amp O topLevelComponent displayName displayName Object values otherComponents forEach component gt component displayName displayName component displayName return Object assign topLevelComponent otherComponents The above code lives in a util file and can easily be imported within our library any time we want to use sub components That allows us to write a modal component file that is very easy on the eyes export const Modal attachSubComponents Modal props ModalProps gt Header Content Footer Title Subtitle HeroImage And best of all it s a great solution for all of our users Thanks for reading I hope this technique for creating clean composed components in React will level up you and your team Kaeden Wilewile xyz |
2022-10-31 16:30:00 |
海外TECH |
Engadget |
FTC says ed tech company Chegg exposed data of 40 million users |
https://www.engadget.com/ftc-chegg-order-student-data-exposed-162414289.html?src=rss
|
FTC says ed tech company Chegg exposed data of million usersYou may trust Chegg with your textbooks or tutoring but regulators aren t quite so confident The Federal Trade Commission has filed a complaint accusing education tech provider Chegg of careless security practices that compromised personal data since Among the violations the company reportedly exposed sensitive info for roughly million customers in after a former contractor used their login to access a third party database The content included names email addresses passwords and even content like religion sexual orientation and parents income ranges The info eventually turned up for sale through the online black market Some of the stolen info belonged to employees Chegg exposed Social Security numbers medical data and other worker details The FTC further alleges Chegg failed to use commercially reasonable safeguards It reportedly let employees and contractors use a single sign in didn t require multi factor authentication and didn t scan for threats The firm stored personal data in plain text and relied on outdated and weak encryption for passwords the Commission adds Officials also say Chegg didn t even have a written security policy until January and didn t provide sufficient security training despite three phishing attacks Chegg has agreed to honor a proposed order to make amends the FTC says The company will have to both define the information it collects and limit the scope of that collection It will institute multi factor authentication and a comprehensive security program that includes encryption and security training Customers will have access to their data and will be allowed to ask Chegg to delete that data The provider isn t alone in facing government crackdowns over security problems Uber settled with the Justice Department in July for failing to notify customers of a major data breach while the FTC recently penalized Drizly and its CEO for alleged lapses that led to a incident The government is clearly eager to prevent data breaches and make an example of companies with sub par security measures In a statement to Engadget Chegg says it treats data privacy as a top priority The company cooperated with the FTC and will comply fully with the Commission s order It adds that it didn t face any fines and believes this is a reflection of its improved security stance You can read the full response below Data privacy is a top priority for Chegg Chegg worked cooperatively with the Federal Trade Commission on these matters to find a mutually agreeable outcome and will comply fully with the mandates outlined in the Commission s Administrative Order The incidents in the Federal Trade Commission s complaint related to issues that occurred more than two years ago No monetary fines were assessed which we believe is indicative of our current robust security practices as well as our efforts to continuously improve our security program Chegg is wholly committed to safeguarding users data and has worked with reputable privacy organizations to improve our security measures and will continue our efforts |
2022-10-31 16:24:14 |
海外科学 |
NYT > Science |
‘Planet Killer’ Asteroid Spotted That Poses Distant Risk to Earth |
https://www.nytimes.com/2022/10/31/science/asteroid-planet-killer.html
|
Planet Killer Asteroid Spotted That Poses Distant Risk to EarthThe space rock had been hidden by the glare of the sun suggesting that more large asteroids are in a solar system region difficult to study from Earth |
2022-10-31 16:25:58 |
海外科学 |
NYT > Science |
Aging Infrastructure May Create Higher Flood Risk in L.A., Study Finds |
https://www.nytimes.com/2022/10/31/climate/los-angeles-flood-risk.html
|
Aging Infrastructure May Create Higher Flood Risk in L A Study FindsBetween and city residents could experience a foot of flooding during an extreme storm scientists found Most of them don t live in beachfront mansions |
2022-10-31 16:16:57 |
海外科学 |
NYT > Science |
Cholera Outbreaks Surge Worldwide As Vaccine Supply Drains |
https://www.nytimes.com/2022/10/31/health/cholera-outbreaks-vaccine.html
|
Cholera Outbreaks Surge Worldwide As Vaccine Supply DrainsA record number of outbreaks have been reported after droughts floods and wars have forced large numbers of people to live in unsanitary conditions |
2022-10-31 16:15:33 |
海外科学 |
BBC News - Science & Environment |
Christmas turkey fears as England bird flu rules widened |
https://www.bbc.co.uk/news/science-environment-63431588?at_medium=RSS&at_campaign=KARANGA
|
outbreak |
2022-10-31 16:10:27 |
金融 |
金融庁ホームページ |
金融庁職員の新型コロナウイルス感染について公表しました。 |
https://www.fsa.go.jp/news/r4/sonota/20221031.html
|
新型コロナウイルス |
2022-10-31 18:00:00 |
金融 |
金融庁ホームページ |
「拠点開設サポートオフィス」について更新しました。 |
https://www.fsa.go.jp/policy/marketentry/index.html
|
開設 |
2022-10-31 17:00:00 |
金融 |
金融庁ホームページ |
国際金融センター特設ページを更新しました。 |
https://www.fsa.go.jp/internationalfinancialcenter/index.html
|
alfinancialcenterjapan |
2022-10-31 17:00:00 |
金融 |
金融庁ホームページ |
障がい者等に配慮した取組みに関するアンケート調査の結果について公表しました。 |
https://www.fsa.go.jp/news/r4/ginkou/20221031-2/20221031.html
|
障がい者 |
2022-10-31 17:00:00 |
金融 |
金融庁ホームページ |
「銀行法施行規則等の一部を改正する内閣府令」等について公表しました。 |
https://www.fsa.go.jp/news/r4/ginkou/20221031/20221031.html
|
内閣府令 |
2022-10-31 17:00:00 |
金融 |
金融庁ホームページ |
「金融商品取引業等に関する内閣府令第二条第一項の規定に基づき金融庁長官が定める書類を定める件の一部を改正する件(案)」に対するパブリックコメントの結果等について公表しました。 |
https://www.fsa.go.jp/news/r4/shouken/20221031/20221031.html
|
内閣府令 |
2022-10-31 17:00:00 |
金融 |
金融庁ホームページ |
金融審議会「顧客本位タスクフォース」(第3回)を開催します。 |
https://www.fsa.go.jp/news/r4/singi/20221031.html
|
金融審議会 |
2022-10-31 17:00:00 |
ニュース |
BBC News - Home |
Suella Braverman was warned over Manston migrant centre overcrowding |
https://www.bbc.co.uk/news/uk-politics-63458493?at_medium=RSS&at_campaign=KARANGA
|
braverman |
2022-10-31 16:38:59 |
ニュース |
BBC News - Home |
Union calls for more Royal Mail strikes after new pay offer |
https://www.bbc.co.uk/news/business-63459389?at_medium=RSS&at_campaign=KARANGA
|
calls |
2022-10-31 16:23:52 |
ニュース |
BBC News - Home |
Christmas turkey fears as England bird flu rules widened |
https://www.bbc.co.uk/news/science-environment-63431588?at_medium=RSS&at_campaign=KARANGA
|
outbreak |
2022-10-31 16:10:27 |
ニュース |
BBC News - Home |
Manston migrant centre: What are the problems? |
https://www.bbc.co.uk/news/explainers-63456015?at_medium=RSS&at_campaign=KARANGA
|
centre |
2022-10-31 16:45:04 |
ニュース |
BBC News - Home |
US midterm elections: What's happened to economy under Biden? |
https://www.bbc.co.uk/news/59402975?at_medium=RSS&at_campaign=KARANGA
|
economy |
2022-10-31 16:35:43 |
ニュース |
BBC News - Home |
Jurgen Klopp: Liverpool boss dismisses suggestions his squad is in decline |
https://www.bbc.co.uk/sport/football/63462232?at_medium=RSS&at_campaign=KARANGA
|
Jurgen Klopp Liverpool boss dismisses suggestions his squad is in declineJurgen Klopp says being Liverpool manager is not just about when the sun is shining and dismisses suggestions his squad is in decline |
2022-10-31 16:32:19 |
北海道 |
北海道新聞 |
政府「サハリン1」権益維持 原油確保へ新会社参画 |
https://www.hokkaido-np.co.jp/article/753822/
|
天然ガス |
2022-11-01 01:01:42 |
コメント
コメントを投稿