Required Knowledge:
- TypeScript/JavaScript fundamentals
- AWS Lambda concepts and deployment
- Promise-based asynchronous programming
- Basic understanding of state machines and workflows
| [lints.clippy] | |
| #################################### Warns ##################################### | |
| #--- suspicious, complexity, perf & style groups are warn-by-default | |
| #--- set entire pedantic group to warn (pedantic is intended for opt-outs) | |
| pedantic = { level = "warn", priority = -1 } # feel free to #[allow] specific lints in code | |
| nursery = { level = "warn", priority = -1 } | |
| #--- set selective lints from restriction group to warn (restriction is intended for opt-ins) | |
| # restriction = { level = "warn", priority = -1 } | |
| absolute_paths = "warn" # clippy.toml: `absolute-paths-max-segments = 2` | |
| allow_attributes = "warn" |
| // pseudocode | |
| const { ReactCDK, App, Stack } = require('@aws-cdk/react') | |
| const Bucket = require('@aws-cdk/react/s3') | |
| const { CloudFrontDistribution, Origins, DefaultOrigin } = require('@aws-cdk/react/cloudfront') | |
| const { Api, Resource, Integration } = require('@aws-cdk/react/apigateway') | |
| const Lambda = require('@aws-cdk/react/lambda') | |
| const EchoLambda = ( | |
| <Lambda> | |
| { |
Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.
@broros
otherwise why would he hand over a popular package to a stranger?
If it's not fun anymore, you get literally nothing from maintaining a popular package.
One time, I was working as a dishwasher in a restu
React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".
With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.
Note:
When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.
If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:
| // I'm suggesting we add a new "adopt X from <Y />" syntax to the JSX language | |
| // it would de-sugar to render prop children, but look and read better than | |
| // what we currently have. For example: | |
| // 1. | |
| // this sugar | |
| function MyComponent(props) { | |
| adopt foo from <Bar />; | |
| return <div>{foo}</div>; | |
| } |
| // http://en.wikipedia.org/wiki/Fisher-Yates_shuffle#The_modern_algorithm | |
| // https://stackoverflow.com/a/12646864/2684520 | |
| // Pre-ES6 | |
| /** | |
| * Randomize array element order in-place. | |
| * Using Durstenfeld shuffle algorithm. | |
| */ | |
| function shuffleArray(array) { | |
| for (var i = array.length - 1; i > 0; i--) { |
| pragma solidity ^0.4.18; | |
| // import './SomeContract.sol'; | |
| contract HelloYou { | |
| event Hello(address you); | |
| function sayHello() public { | |
| address _person = msg.sender; | |
A tiny (265 byte) utility to create state machine components using two pure functions.
The API is a single function that accepts 2 pure functions as arguments: