Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

148
Vistas
How render list from Resource Picker on my app page

I started learning shopify and created an app via the shopify cli create node app. I use polaris to render the components on the app page. And I can't figure out how I can display the list of selected products from the Resource Picker on the page. I can do this somehow through map () returning list.

My code:

import { Page, Card, ResourceList } from '@shopify/polaris';
import { ResourcePicker } from '@shopify/app-bridge-react';

import { useState } from 'react';

const Index = () => {
  const [resources, setResources] = useState([]);
  const [open, setOpen] = useState(false);
  const handleSelection = (resources) => {
    setOpen(false);
    setResources(resources);
  };

  return (
    <Page
      title={'product selector'}
      primaryAction={{
        content: 'Select products',
        onAction: () => setOpen(true)
      }}>
      <ResourcePicker
        resourceType={'Product'}
        open={open}
        onCancel={() => {
          setOpen(false);
        }}
        onSelection={(resources) => {
          handleSelection(resources);
        }}/>
      <Card>
        <ResourceList
          resourceName={{singular: 'product', plural: 'products'}}
          items={resources}
          renderItem={}>

        </ResourceList>
      </Card>
    </Page>
  );
};

export default Index;
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda