Select to view content in your preferred language

Minified React Error #130 when importing the Messages component from jimu-ui

259
2
Jump to solution
3 weeks ago
Labels (1)
slangley_sw
Emerging Contributor

I have a custom widget that I've developed that (in part) utilizes the Messages component from jimu-ui.  The widget works 100% if I comment out the use of the Messages component.  If I comment out everything else in the widget except the Messages component it will fail.  So I've been able to isolate the problem to the use of this item.  

I'm importing with

import {Message, Tabs, Tab} from 'jimu-ui'

and then displaying a simple string as content.  

<Message
open={messageOpen}
onClose={handleMessageClose}
// severity={messageType}
message={messageContent}
autoHideDuration={3000}
/>

messageOpen is a state variable that accepts a boolean value that is initialized as false.  The callback to handleMessageClose is just a standard flipping of that state.

const [messageOpen, setMessageOpen] = React.useState<boolean>(false)
const handleMessageClose = () => {
setMessageOpen(false)
}

Our enterprise environment is at 11.5 and we have installed the web apps patch.  I'm using arcgis-experience-builder-1.18

0 Kudos
1 Solution

Accepted Solutions
JeffreyThompson2
MVP Frequent Contributor

The Message component was added in Experience Builder 1.18. Enterprise 11.5 is running 1.17, so it does not have it.

https://developers.arcgis.com/experience-builder/guide/whats-new/#developer-edition-updates

https://developers.arcgis.com/experience-builder/guide/release-versions/

GIS Developer
City of Arlington, Texas

View solution in original post

0 Kudos
2 Replies
JeffreyThompson2
MVP Frequent Contributor

The Message component was added in Experience Builder 1.18. Enterprise 11.5 is running 1.17, so it does not have it.

https://developers.arcgis.com/experience-builder/guide/whats-new/#developer-edition-updates

https://developers.arcgis.com/experience-builder/guide/release-versions/

GIS Developer
City of Arlington, Texas
0 Kudos
slangley_sw
Emerging Contributor

oh.  well then ok!

0 Kudos