stoplightio / json-schema-viewer

A JSON Schema viewer React component
Apache License 2.0
183 stars 37 forks source link

[Mosaic] deprecation notice from jotai #259

Open robbieaverill opened 5 months ago

robbieaverill commented 5 months ago

Context

The browser console is full of deprecation notices when using json-schema-viewer. I would love to help upgrade this dependency, however it seems like Mosaic is not an open source library.

Current Behavior

console.js:273 [DEPRECATED]: use `useAtomValue` from `jotai` instead. 
    at Divider (webpack-internal:///../../common/temp/node_modules/.pnpm/@stoplight+json-schema-viewer@4.16.1_@babel+core@7.23.7_@babel+template@7.24.7_@stoplight+mar_5xf4cu4e5qhaddtsd35lb2ujpe/node_modules/@stoplight/json-schema-viewer/index.mjs:787:20)
    at div
    at Box (webpack-internal:///../../common/temp/node_modules/.pnpm/@stoplight+mosaic@1.53.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@stoplight/mosaic/core.esm.js:759:3)
    at Flex (webpack-internal:///../../common/temp/node_modules/.pnpm/@stoplight+mosaic@1.53.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@stoplight/mosaic/core.esm.js:6125:3)
    at div

Expected Behavior

Possible Workaround/Solution

Solution: upgrade Jotai and/or follow the deprecation notice recommendations.

weyert commented 3 months ago

Fixed some of it as part of https://github.com/stoplightio/json-schema-viewer/pull/260