Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const render = (translatedMessages) => {
ReactDOM.render(
,
document.getElementById('app')
);
};
}
// If the route component has a static shouldUpdateScroll function then
// use this to determine if scroll middleware should be applied
const useScrollMiddleware = useScroll((prevRouterProps, routerProps) => {
const component = routerProps.routes[routerProps.routes.length - 1].component
if (component && component.shouldUpdateScroll) {
return component.shouldUpdateScroll(prevRouterProps, routerProps)
}
return true
})
return (
)
}
const render = (messages) => {
ReactDOM.render(
,
MOUNT_NODE
)
}
// declare const module: any
const render = (translatedMessages) => {
ReactDOM.render(
,
document.getElementById('app')
);
};
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { applyRouterMiddleware, Router } from 'react-router';
import useScroll from 'react-router-scroll';
import { history, store } from './history';
import routes from './routes';
render(
,
document.getElementById( 'app' )
);
render() {
const { store, history, routes, type, renderProps } = this.props;
return (
<div>
{type === 'server'
?
:
}
</div>
);
}
}
} else {
analytics.identify(Cookies.get('learnrelay_guestid'), trackHistory)
}
}
})
function shouldScrollUp(previousProps, {location}) {
return location.hash === '' && (previousProps === null || previousProps.location.pathname !== location.pathname)
}
ReactDOM.render(
(
),
document.getElementById('root')
)
import Relay, {DefaultNetworkLayer} from 'react-relay';
import {Router, browserHistory, applyRouterMiddleware} from 'react-router';
import useRelay from 'react-router-relay';
import routes from './routes';
Relay.injectNetworkLayer(
new DefaultNetworkLayer('/graphql', {
credentials: 'include',
})
);
ReactDOM.render(
,
document.getElementById('root')
);
const Main = ({store}: { store: Store }) => (
);