Skip to content

Commit

Permalink
Improve deprecation notice.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterp committed Jul 26, 2020
1 parent a576dc9 commit b498ba9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/forms/src/coercion.js
@@ -1,3 +1,4 @@
import React from 'react'
const CoercionContext = React.createContext()

export const CoercionContextProvider = ({ children }) => {
Expand Down
8 changes: 5 additions & 3 deletions packages/web/src/form/index.js
Expand Up @@ -5,9 +5,11 @@ export * from '@redwoodjs/forms'
*/
export const Form = () => {
console.warn(`
Deprecation notice for forms:
import { Form } from "@redwoodjs/web" has been deprecated.
Please import from '@redwoodjs/forms'
Deprecation notice, forms have moved:
Pleas use:
'import { Form } from "@redwoodjs/forms"'
instead of:
'import { Form } from "@redwoodjs/web"'
`)
return Form
}
2 changes: 1 addition & 1 deletion packages/web/src/index.js
Expand Up @@ -13,5 +13,5 @@ export { default as FatalErrorBoundary } from 'src/components/FatalErrorBoundary
export { default as RedwoodProvider } from 'src/components/RedwoodProvider'

export * from './graphql'
export * from './form/form'
export * from './form'
export * from './flash'

0 comments on commit b498ba9

Please sign in to comment.