This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
class ReducerComponent extends React.Component { | |
constructor(props) { | |
super(props); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
class ReducerComponent extends React.Component { | |
constructor(props) { | |
super(props); | |
} | |
reducer = (state, action) => state; | |
dispatch = action => this.setState(state => this.reducer(state, action)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: React Color Picker | |
description: '' | |
author: jaredpalmer | |
host: EXCEL | |
api_set: {} | |
script: | |
content: |+ | |
async function colorCell(color = "yellow") { | |
await Excel.run(async (context) => { | |
const range = context.workbook.getSelectedRange(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const fs = require('fs'); | |
const path = require('path'); | |
const paths = { | |
webpackDev: path.resolve( | |
`./node_modules/react-scripts-ts/config/webpack.config.dev.js` | |
), | |
webpackProd: path.resolve( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
// Monkey-patch react-dev-utils to get the error overlay with SSR | |
const pathToDevClient = 'node_modules/react-dev-utils/webpackHotDevClient.js'; | |
// The react-scripts default | |
const reactScriptsPort = 3000; | |
// Read the dev client out of node_modules | |
const HotDevClient = fs.readFileSync(pathToDevClient, 'utf8'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/server.js | |
import App from './App'; | |
import React from 'react'; | |
import express from 'express'; | |
import fs from 'fs'; | |
import path from 'path'; | |
import { renderToString } from 'react-dom/server'; | |
const server = express(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": [ | |
"react-app" | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
module.exports = { | |
webpack: (config, options, webpack) => { | |
// change Backpack's default entry point to 'src/server.js' | |
config.entry.main = path.join(__dirname, 'src/server.js'); | |
// Tell Backpack how to handle .css files (load into memory and noop) | |
config.module.rules.push({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { injectAddRule, resetCache } from 'jsxstyle/lib/styleCache'; | |
import App from './App'; | |
import React from 'react'; | |
import { StaticRouter } from 'react-router-dom'; | |
import express from 'express'; | |
import path from 'path'; | |
import { renderToString } from 'react-dom/server'; | |
const assets = require(process.env.RAZZLE_ASSETS_MANIFEST); |