AWS Amplify Release, GraphQL, and Recent Curated Links

Authenticator

npm install -g @aws-amplify/cli@latest
yarn global add @aws-amplify/cli@latest
export default function App() {
return (
<Authenticator>
{({ signOut, user }) => (
<main>
<h1>Hello {user.username}</h1>
<button onClick={signOut}>Sign out</button>
</main>
)}
</Authenticator>
);
}
export default function App() {
return (
<Authenticator initialState="signUp">
{({ signOut, user }) => (
<main>
<h1>Hello {user.username}</h1>
<button onClick={signOut}>Sign out</button>
</main>
)}
</Authenticator>
);
}
export default function App() {
return (
<Authenticator socialProviders={['amazon', 'apple', 'facebook', 'google']}>
{({ signOut, user }) => (
<main>
<h1>Hello {user.username}</h1>
<button onClick={signOut}>Sign out</button>
</main>
)}
</Authenticator>
);
}
export default function App() {
return (
<Authenticator signUpAttributes={[]}>
{({ signOut, user }) => (
<main>
<h1>Hello {user.username}</h1>
<button onClick={signOut}>Sign out</button>
</main>
)}
</Authenticator>
);
}
export default function App() {
return (
<Authenticator loginMechanisms={['username']}>
{({ signOut, user }) => (
<main>
<h1>Hello {user.username}</h1>
<button onClick={signOut}>Sign out</button>
</main>
)}
</Authenticator>
);
}

In-App Messaging

npm install -E aws-amplify@in-app-messaging aws-amplify-react-native@in-app-messaging amazon-cognito-identity-js @react-native-community/netinfo @react-native-async-storage/async-storage @react-native-picker/picker react-native-get-random-values react-native-url-polyfill
pod install
import 'react-native-get-random-values';
import 'react-native-url-polyfill/auto';
import { AppRegistry } from 'react-native';
import App from './App';
import { name as appName } from './app.json';
AppRegistry.registerComponent(appName, () => App);
import Amplify from 'aws-amplify';
import awsconfig from './src/aws-exports';
Amplify.configure(awsconfig);
import {
InAppMessagingProvider,
InAppMessageDisplay
} from 'aws-amplify-react-native';
const App = () => (
<InAppMessagingProvider>
{/* Your application */}
<InAppMessageDisplay />
</InAppMessagingProvider>
);
import React, { useEffect } from 'react';
import { SafeAreaView, Button } from 'react-native';
import { Analytics, Notifications } from 'aws-amplify';
import {
InAppMessagingProvider,
InAppMessageDisplay
} from 'aws-amplify-react-native';
const { InAppMessaging } = Notifications;// To display your in-app message, make sure this event name matches one you created
// in an In-App Messaging campaign!
const myFirstEvent = { name: 'my_first_event' };
const App = () => {
useEffect(() => {
// Messages from your campaigns need to be synced from the backend before they
// can be displayed. You can trigger this anywhere in your app. Here we are
// syncing just once when this component (your app) renders for the first time.
InAppMessaging.syncMessages();
}, []);
return (
<SafeAreaView>
<InAppMessagingProvider>
{/* This button has an example of an analytics event triggering the in-app message. */}
<Button
onPress={() => {
Analytics.record(myFirstEvent);
}}
title="Record Analytics Event"
/>
{/* This button has an example of an In-app Messaging event triggering the in-app message.*/}
<Button
onPress={() => {
InAppMessaging.dispatchEvent(myFirstEvent);
}}
title="Send In-App Messaging Event"
/>
<InAppMessageDisplay />
</InAppMessagingProvider>
</SafeAreaView>
);
};
export default App;

Custom Resources w/ AWS CDK or Cloudformation

Overriding Amplify Backend Resources with CDK

Prototype a Fullstack App without an AWS Account

GraphQL Transformer v2

Thanks & Curated Follows

--

--

--

Software dev, data, heavy metal, transit, economics, freethought, atheism, cycling, livability, beautiful things & adrenaline junkie.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

//platform.twitter.com/widgets.js from Twitter https://twitter.com/techandgeek

Front-End Stack (Guide to become Full Stack Developer)

You Just Have This Moment!

Redux — Reducers From Array.reduce()

Supercharge your CreateReactApp workflow with Hygen

Build offline-first mobile application using MongoDB Realm Sync in React Native

Laravel Sanctum Authentication for React App using Breeze

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adron Hall

Adron Hall

Software dev, data, heavy metal, transit, economics, freethought, atheism, cycling, livability, beautiful things & adrenaline junkie.

More from Medium

Build a Serverless Async CSV Parser

DynamoDB — How to query with many complicated filters (Part 2)

How to use TypeORM with serverless Aurora?

How to Implement a Serverless Webhook