overleaf/services/web/frontend/js/shared/context/root-context.js
Miguel Serrano 1fcf94c3b9 Merge pull request #3436 from overleaf/msm-react-shared-context
React shared context

GitOrigin-RevId: ebc6fa90dd8c65ddf803fd457c99a30f0e8e3c9c
2020-12-15 03:05:07 +00:00

15 lines
470 B
JavaScript

import React from 'react'
import { ApplicationProvider } from './application-context'
import { EditorProvider } from './editor-context'
import createSharedContext from 'react2angular-shared-context'
// eslint-disable-next-line react/prop-types
export function ContextRoot({ children }) {
return (
<ApplicationProvider>
<EditorProvider>{children}</EditorProvider>
</ApplicationProvider>
)
}
export const rootContext = createSharedContext(ContextRoot)