I'm writing a webpack plugin, which should generate message catalogs for each chunk.
In build folder, I have:
index.js
index.en.js
index.cs.js
local hyper = {"cmd", "alt"} | |
--Predicate that checks if a window belongs to a screen | |
function isInScreen(screen, win) | |
return win:screen() == screen | |
end | |
function focusScreen(screen) | |
--Get windows within screen, ordered from front to back. | |
--If no windows exist, bring focus to desktop. Otherwise, set focus on |
function NotificationsHeader({ fetchNotifications, subscribeNotifications }) { | |
const [notifications, setNotifications] = useState([]) | |
useEffect(() => { | |
// fetch initial notifications | |
fetchNotifications().then(notifications => { | |
setNotifications(notifications) | |
}) | |
// subscribe to new notifications |
I'm writing a webpack plugin, which should generate message catalogs for each chunk.
In build folder, I have:
index.js
index.en.js
index.cs.js
I'm using this approach to have centralized route config in Next.js. I don't have the fully automated solution. Right now I'm writing route configs and links manually to figure out if it works and what are the drawbacks.
I believe the automation is the last step to make it completely seamless.
This is the only file that needs to be wrote manually.
// I believe this file could be automatically generated. Each route | |
// could be typechecked that all params are passed into it. | |
import { projectRoute } from "routes.js" | |
import { ProjectLink } from "routes.utils.ts" | |
export const ProjectLink = makeLink(projectRoute) | |
// Example usage of `ProjectLink` component. It's like regular Link, but it accepts `params` | |
// which are injected into `routeConfig.as` pattern. |
import React, { Component } from 'react'; | |
import './App.css'; | |
import { connect } from 'react-redux'; | |
import Main from './Main/Main.js'; | |
import FooterPage from './Footer/Footer.js'; | |
import { I18nProvider } from '@lingui/react' | |
class App extends Component { |
projectIssue
is resolved with an object "IssueType:18"issueEdit
is called and returns the same object with updated attachments
store.readFragment
)projectIssue
reloaded from cache automatically, but this this it doesn't return objectIn Apollo DevTool I see this field in root query: issue({"issueId":"18","project":"IEP001"}): IssueType:18
.
I believe the query should be updated when object IssueType:18
in cache is updated,
but when it happens, the object is empty.
/* | |
Usage: node ./deprecate.js OTP_TOKEN | |
OTP_TOKEN is used for 2FA | |
*/ | |
const path = require("path") | |
const fs = require("fs-extra") | |
const { exec } = require("child_process") |
const flip = () => ({ | |
flipResults: Math.random() | |
}) | |
// creation of headlesscomponent | |
class CoinFlip extends React.Component { | |
state = flip() | |
handleClick = () => this.setState(flip) | |
api() { |
Example of authentication mutations and user queries in GraphQL API.